forked from mirror/async-std
		
	Just use serde as a feature directly
This commit is contained in:
		
							parent
							
								
									c5a757fb60
								
							
						
					
					
						commit
						6b0a81012b
					
				
					 2 changed files with 4 additions and 8 deletions
				
			
		|  | @ -33,15 +33,11 @@ default = [ | ||||||
|   "mio-uds", |   "mio-uds", | ||||||
|   "num_cpus", |   "num_cpus", | ||||||
|   "pin-project-lite", |   "pin-project-lite", | ||||||
|   "serde-support", |   "serde", | ||||||
| ] | ] | ||||||
| docs = ["attributes", "unstable"] | docs = ["attributes", "unstable"] | ||||||
| unstable = ["default", "broadcaster"] | unstable = ["default", "broadcaster"] | ||||||
| attributes = ["async-attributes"] | attributes = ["async-attributes"] | ||||||
| serde-support = [ |  | ||||||
|   "default", |  | ||||||
|   "serde", |  | ||||||
| ] |  | ||||||
| std = [ | std = [ | ||||||
|   "async-macros", |   "async-macros", | ||||||
|   "crossbeam-utils", |   "crossbeam-utils", | ||||||
|  |  | ||||||
|  | @ -13,16 +13,16 @@ use crate::path::Path; | ||||||
| use crate::prelude::*; | use crate::prelude::*; | ||||||
| #[cfg(feature = "unstable")] | #[cfg(feature = "unstable")] | ||||||
| use crate::stream::{self, FromStream, IntoStream}; | use crate::stream::{self, FromStream, IntoStream}; | ||||||
| #[cfg(feature = "serde-support")] | #[cfg(feature = "serde")] | ||||||
| use serde::{Serialize, Deserialize}; | use serde::{Serialize, Deserialize}; | ||||||
| 
 | 
 | ||||||
| /// This struct is an async version of [`std::path::PathBuf`].
 | /// This struct is an async version of [`std::path::PathBuf`].
 | ||||||
| ///
 | ///
 | ||||||
| /// [`std::path::Path`]: https://doc.rust-lang.org/std/path/struct.PathBuf.html
 | /// [`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)] | #[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)] | ||||||
| pub struct PathBuf { | pub struct PathBuf { | ||||||
|     #[cfg_attr(feature = "serde-support", serde(flatten))] |     #[cfg_attr(feature = "serde", serde(flatten))] | ||||||
|     inner: std::path::PathBuf, |     inner: std::path::PathBuf, | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue