Skip to content

Commit

Permalink
std: Remove plattform-specific code from os_str
Browse files Browse the repository at this point in the history
  • Loading branch information
brson committed Oct 1, 2016
1 parent d311079 commit 0fb8379
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/libstd/ffi/os_str.rs
Expand Up @@ -53,17 +53,6 @@ impl OsString {
OsString { inner: Buf::from_string(String::new()) }
}

#[cfg(unix)]
fn _from_bytes(vec: Vec<u8>) -> Option<OsString> {
use os::unix::ffi::OsStringExt;
Some(OsString::from_vec(vec))
}

#[cfg(windows)]
fn _from_bytes(vec: Vec<u8>) -> Option<OsString> {
String::from_utf8(vec).ok().map(OsString::from)
}

/// Converts to an `OsStr` slice.
#[stable(feature = "rust1", since = "1.0.0")]
pub fn as_os_str(&self) -> &OsStr {
Expand Down

0 comments on commit 0fb8379

Please sign in to comment.