Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Commit

Permalink
Make rustc-serialize fully portable
Browse files Browse the repository at this point in the history
  • Loading branch information
Jethro Beekman committed Jan 11, 2019
1 parent 71b8d6e commit 4ae26e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,7 @@ array! {
}

impl Encodable for path::Path {
#[cfg(target_os = "redox")]
#[cfg(not(any(unix, windows))]
fn encode<S: Encoder>(&self, e: &mut S) -> Result<(), S::Error> {
self.as_os_str().to_str().unwrap().encode(e)
}
Expand All @@ -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: Decoder>(d: &mut D) -> Result<path::PathBuf, D::Error> {
let string: String = try!(Decodable::decode(d));
let s: OsString = OsString::from(string);
Expand Down

0 comments on commit 4ae26e2

Please sign in to comment.