Just use serde as a feature directly

poc-serde-support
James Munns 5 years ago
parent c5a757fb60
commit 6b0a81012b

@ -33,15 +33,11 @@ default = [
"mio-uds",
"num_cpus",
"pin-project-lite",
"serde-support",
"serde",
]
docs = ["attributes", "unstable"]
unstable = ["default", "broadcaster"]
attributes = ["async-attributes"]
serde-support = [
"default",
"serde",
]
std = [
"async-macros",
"crossbeam-utils",

@ -13,16 +13,16 @@ use crate::path::Path;
use crate::prelude::*;
#[cfg(feature = "unstable")]
use crate::stream::{self, FromStream, IntoStream};
#[cfg(feature = "serde-support")]
#[cfg(feature = "serde")]
use serde::{Serialize, Deserialize};
/// This struct is an async version of [`std::path::PathBuf`].
///
/// [`std::path::Path`]: https://doc.rust-lang.org/std/path/struct.PathBuf.html
#[cfg_attr(feature = "serde-support", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct PathBuf {
#[cfg_attr(feature = "serde-support", serde(flatten))]
#[cfg_attr(feature = "serde", serde(flatten))]
inner: std::path::PathBuf,
}

Loading…
Cancel
Save