From 9800ee078b22e2aa9886a6751f9778fda80a16b6 Mon Sep 17 00:00:00 2001 From: Jethro Beekman Date: Fri, 11 Jan 2019 11:49:18 +0530 Subject: [PATCH] Make rustc-serialize fully portable --- src/serialize.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/serialize.rs b/src/serialize.rs index 296f3d4..f330756 100644 --- a/src/serialize.rs +++ b/src/serialize.rs @@ -1356,7 +1356,7 @@ array! { } impl Encodable for path::Path { - #[cfg(target_os = "redox")] + #[cfg(not(any(unix, windows)))] fn encode(&self, e: &mut S) -> Result<(), S::Error> { self.as_os_str().to_str().unwrap().encode(e) } @@ -1380,7 +1380,7 @@ impl Encodable for path::PathBuf { } impl Decodable for path::PathBuf { - #[cfg(target_os = "redox")] + #[cfg(not(any(unix, windows)))] fn decode(d: &mut D) -> Result { let string: String = try!(Decodable::decode(d)); let s: OsString = OsString::from(string);