Skip to content

Commit 056ebcc

Browse files
committed
Rollback prefix
1 parent 7294422 commit 056ebcc

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/libstd/path.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,7 @@ use sys::path::{is_sep_byte, is_verbatim_sep, MAIN_SEP_STR, parse_prefix};
136136
// Windows Prefixes
137137
////////////////////////////////////////////////////////////////////////////////
138138

139-
/// Path prefixes (Redox and Windows only).
140-
///
141-
/// Redox uses schemes like `scheme:reference` to identify different I/O systems
139+
/// Path prefixes (Windows only).
142140
///
143141
/// Windows uses a variety of path styles, including references to drive
144142
/// volumes (like `C:`), network shared folders (like `\\server\share`) and
@@ -187,9 +185,6 @@ impl<'a> Prefix<'a> {
187185
os_str_as_u8_slice(s).len()
188186
}
189187
match *self {
190-
#[cfg(target_os = "redox")]
191-
Verbatim(x) => 1 + os_str_len(x),
192-
#[cfg(not(target_os = "redox"))]
193188
Verbatim(x) => 4 + os_str_len(x),
194189
VerbatimUNC(x, y) => {
195190
8 + os_str_len(x) +

src/libstd/sys/redox/path.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use path::Prefix;
1211
use ffi::OsStr;
1312

1413
#[inline]
@@ -23,8 +22,9 @@ pub fn is_verbatim_sep(b: u8) -> bool {
2322

2423
pub fn parse_prefix(path: &OsStr) -> Option<Prefix> {
2524
if let Some(path_str) = path.to_str() {
26-
if let Some(i) = path_str.find(':') {
27-
Some(Prefix::Verbatim(OsStr::new(&path_str[..i])))
25+
if let Some(_i) = path_str.find(':') {
26+
//TODO: Redox specific prefix Some(Prefix::Verbatim(OsStr::new(&path_str[..i])))
27+
None
2828
} else {
2929
None
3030
}

0 commit comments

Comments
 (0)