Skip to content

Commit ad95c16

Browse files
committed
Remove has_redox_scheme
Redox OS is moving away from name:/path style paths to /scheme/name/path style paths which are already handled correctly without has_redox_scheme.
1 parent a2174e6 commit ad95c16

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

std/src/path.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -294,11 +294,6 @@ where
294294
}
295295
}
296296

297-
// Detect scheme on Redox
298-
pub(crate) fn has_redox_scheme(s: &[u8]) -> bool {
299-
cfg!(target_os = "redox") && s.contains(&b':')
300-
}
301-
302297
////////////////////////////////////////////////////////////////////////////////
303298
// Cross-platform, iterator-independent parsing
304299
////////////////////////////////////////////////////////////////////////////////
@@ -2834,8 +2829,7 @@ impl Path {
28342829
Components {
28352830
path: self.as_u8_slice(),
28362831
prefix,
2837-
has_physical_root: has_physical_root(self.as_u8_slice(), prefix)
2838-
|| has_redox_scheme(self.as_u8_slice()),
2832+
has_physical_root: has_physical_root(self.as_u8_slice(), prefix),
28392833
front: State::Prefix,
28402834
back: State::Body,
28412835
}

std/src/sys/path/unix.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,7 @@ pub(crate) fn absolute(path: &Path) -> io::Result<PathBuf> {
6262
}
6363

6464
pub(crate) fn is_absolute(path: &Path) -> bool {
65-
if cfg!(target_os = "redox") {
66-
// FIXME: Allow Redox prefixes
67-
path.has_root() || crate::path::has_redox_scheme(path.as_u8_slice())
68-
} else if cfg!(any(unix, target_os = "hermit", target_os = "wasi")) {
65+
if cfg!(any(unix, target_os = "hermit", target_os = "wasi")) {
6966
path.has_root()
7067
} else {
7168
path.has_root() && path.prefix().is_some()

0 commit comments

Comments
 (0)