mirror of
https://github.com/trussed-dev/cbor-smol.git
synced 2026-06-20 04:17:03 -07:00
Migrate to serde-core
This should make compilation faster for downstream
This commit is contained in:
committed by
Sosthène Guédon
parent
0b146b79e4
commit
66d760c231
@@ -1,6 +1,8 @@
|
||||
use serde::Deserialize;
|
||||
use core::convert::TryInto;
|
||||
|
||||
use serde::de::IntoDeserializer;
|
||||
use serde_core as serde;
|
||||
|
||||
use serde::de::{self, Deserialize, DeserializeSeed, IntoDeserializer, Visitor};
|
||||
|
||||
use super::error::{Error, Result};
|
||||
use crate::consts::*;
|
||||
@@ -29,14 +31,6 @@ where
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// TODO: remove these allowances again later
|
||||
// #![allow(unused_imports)]
|
||||
// #![allow(unused_variables)]
|
||||
|
||||
use core::convert::TryInto;
|
||||
|
||||
use serde::de::{self, DeserializeSeed, Visitor};
|
||||
|
||||
/// A structure for deserializing a cbor-smol message.
|
||||
pub struct Deserializer<'de> {
|
||||
// This string starts with the input data and characters are truncated off
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#![allow(unused_variables)]
|
||||
|
||||
use core::fmt::{Display, Formatter};
|
||||
use serde_core as serde;
|
||||
|
||||
/// This is the Result type used by cbor-smol.
|
||||
pub type Result<T, Err = Error> = core::result::Result<T, Err>;
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
extern crate delog;
|
||||
generate_macros!();
|
||||
|
||||
use serde_core as serde;
|
||||
|
||||
pub(crate) mod consts;
|
||||
pub mod de;
|
||||
pub mod error;
|
||||
|
||||
+4
-2
@@ -1,6 +1,8 @@
|
||||
use super::error::{Error, Result};
|
||||
use serde::ser;
|
||||
use serde::Serialize;
|
||||
|
||||
use serde_core as serde;
|
||||
|
||||
use serde::ser::{self, Serialize};
|
||||
|
||||
use core::mem;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user