]> git.lizzy.rs Git - rust.git/commitdiff
Rollback prefix
authorJeremy Soller <jackpot51@gmail.com>
Mon, 12 Dec 2016 21:21:44 +0000 (14:21 -0700)
committerJeremy Soller <jackpot51@gmail.com>
Mon, 12 Dec 2016 21:21:44 +0000 (14:21 -0700)
src/libstd/path.rs
src/libstd/sys/redox/path.rs

index e38cff179c3b4c53e7d130dabde1c6d007573fcf..95c8af664254e03548db28b2ceebf5fa49942676 100644 (file)
 // 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 @@ fn os_str_len(s: &OsStr) -> usize {
             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) +
index c896a39109a6bae1254ab2e99785fab936ddc33f..bef10011887c3fcbc3ecede5b49fd9273c9c24a9 100644 (file)
@@ -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
         }