Skip to content

Commit

Permalink
Actually fix the last std feature
Browse files Browse the repository at this point in the history
  • Loading branch information
kerristrasz committed Jun 26, 2024
1 parent bf3c7cb commit 503cfc9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
///
Expand Down Expand Up @@ -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<R: Read, T: DeserializeOwned>(_reader: R) -> Result<T> {
unimplemented!()
}
Expand All @@ -46,7 +47,6 @@ pub fn from_reader<R: Read, T: DeserializeOwned>(_reader: R) -> Result<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 kv_from_reader<R: Read, T: DeserializeOwned>(_reader: R) -> Result<(String, T)> {
unimplemented!()
}
Expand Down
2 changes: 0 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ pub enum Value {
Object(Object),
}

#[cfg(feature = "std")]
impl serde::Serialize for Value {
fn serialize<S: serde::Serializer>(&self, serializer: S) -> result::Result<S::Ok, S::Error> {
match self {
Expand Down Expand Up @@ -119,7 +118,6 @@ impl KeyValues {
}
}

#[cfg(feature = "std")]
impl serde::Serialize for KeyValues {
fn serialize<S: serde::Serializer>(&self, serializer: S) -> result::Result<S::Ok, S::Error> {
self.root.serialize(serializer)
Expand Down

0 comments on commit 503cfc9

Please sign in to comment.