diff --git a/README.md b/README.md index 6c71019..ef2d914 100644 --- a/README.md +++ b/README.md @@ -48,8 +48,7 @@ vdflex = "0.1.0" ## Feature Flags -- `default`: `["std"]` -- `no_std`: Don't use the standard library +- `default`: No features - `preserve_order`: Preserve entry insertion order ## Quick Start diff --git a/src/de.rs b/src/de.rs index 4ee96da..a280e30 100644 --- a/src/de.rs +++ b/src/de.rs @@ -4,7 +4,9 @@ #![allow(dead_code)] use crate::Result; +use serde::de::DeserializeOwned; use serde::Deserialize; +use std::io::Read; /// Deserialize a KeyValues value representing some type `T`. /// @@ -33,7 +35,6 @@ pub fn kv_from_str<'a, T: Deserialize<'a>>(_s: &'a str) -> Result<(String, T)> { /// /// Deserialization can fail if the input is not valid KeyValues or does not match the structure /// expected by `T`. It can also fail if `T`'s implementation of `Deserialize` decides to fail. -#[cfg(feature = "std")] pub fn from_reader(_reader: R) -> Result { unimplemented!() } @@ -46,7 +47,6 @@ pub fn from_reader(_reader: R) -> Result { /// /// Deserialization can fail if the input is not valid KeyValues or does not match the structure /// expected by `T`. It can also fail if `T`'s implementation of `Deserialize` decides to fail. -#[cfg(feature = "std")] pub fn kv_from_reader(_reader: R) -> Result<(String, T)> { unimplemented!() } diff --git a/src/lib.rs b/src/lib.rs index 697ee0b..13b248e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -23,7 +23,6 @@ pub enum Value { Object(Object), } -#[cfg(feature = "std")] impl serde::Serialize for Value { fn serialize(&self, serializer: S) -> result::Result { match self { @@ -119,7 +118,6 @@ impl KeyValues { } } -#[cfg(feature = "std")] impl serde::Serialize for KeyValues { fn serialize(&self, serializer: S) -> result::Result { self.root.serialize(serializer)