diff options
| author | Jeremy Soller <jackpot51@gmail.com> | 2016-12-12 14:21:44 -0700 |
|---|---|---|
| committer | Jeremy Soller <jackpot51@gmail.com> | 2016-12-12 14:21:44 -0700 |
| commit | 056ebccee3d9587623fab9a9b2e72796c95142b4 (patch) | |
| tree | 1b53569fc1eeb1f20a738a03e5aab57a6c5d5c10 /src/libstd | |
| parent | 729442206cda26e1a6d03f545a872389b2139606 (diff) | |
| download | rust-056ebccee3d9587623fab9a9b2e72796c95142b4.tar.gz rust-056ebccee3d9587623fab9a9b2e72796c95142b4.zip | |
Rollback prefix
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/path.rs | 7 | ||||
| -rw-r--r-- | src/libstd/sys/redox/path.rs | 6 |
2 files changed, 4 insertions, 9 deletions
diff --git a/src/libstd/path.rs b/src/libstd/path.rs index e38cff179c3..95c8af66425 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -136,9 +136,7 @@ use sys::path::{is_sep_byte, is_verbatim_sep, MAIN_SEP_STR, parse_prefix}; // Windows Prefixes //////////////////////////////////////////////////////////////////////////////// -/// Path prefixes (Redox and Windows only). -/// -/// Redox uses schemes like `scheme:reference` to identify different I/O systems +/// Path prefixes (Windows only). /// /// Windows uses a variety of path styles, including references to drive /// volumes (like `C:`), network shared folders (like `\\server\share`) and @@ -187,9 +185,6 @@ impl<'a> Prefix<'a> { os_str_as_u8_slice(s).len() } match *self { - #[cfg(target_os = "redox")] - Verbatim(x) => 1 + os_str_len(x), - #[cfg(not(target_os = "redox"))] Verbatim(x) => 4 + os_str_len(x), VerbatimUNC(x, y) => { 8 + os_str_len(x) + diff --git a/src/libstd/sys/redox/path.rs b/src/libstd/sys/redox/path.rs index c896a39109a..bef10011887 100644 --- a/src/libstd/sys/redox/path.rs +++ b/src/libstd/sys/redox/path.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use path::Prefix; use ffi::OsStr; #[inline] @@ -23,8 +22,9 @@ pub fn is_verbatim_sep(b: u8) -> bool { pub fn parse_prefix(path: &OsStr) -> Option<Prefix> { if let Some(path_str) = path.to_str() { - if let Some(i) = path_str.find(':') { - Some(Prefix::Verbatim(OsStr::new(&path_str[..i]))) + if let Some(_i) = path_str.find(':') { + //TODO: Redox specific prefix Some(Prefix::Verbatim(OsStr::new(&path_str[..i]))) + None } else { None } |
