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.
This commit is contained in:
@@ -294,11 +294,6 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Detect scheme on Redox
|
|
||||||
pub(crate) fn has_redox_scheme(s: &[u8]) -> bool {
|
|
||||||
cfg!(target_os = "redox") && s.contains(&b':')
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Cross-platform, iterator-independent parsing
|
// Cross-platform, iterator-independent parsing
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -2834,8 +2829,7 @@ impl Path {
|
|||||||
Components {
|
Components {
|
||||||
path: self.as_u8_slice(),
|
path: self.as_u8_slice(),
|
||||||
prefix,
|
prefix,
|
||||||
has_physical_root: has_physical_root(self.as_u8_slice(), prefix)
|
has_physical_root: has_physical_root(self.as_u8_slice(), prefix),
|
||||||
|| has_redox_scheme(self.as_u8_slice()),
|
|
||||||
front: State::Prefix,
|
front: State::Prefix,
|
||||||
back: State::Body,
|
back: State::Body,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,10 +62,7 @@ pub(crate) fn absolute(path: &Path) -> io::Result<PathBuf> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn is_absolute(path: &Path) -> bool {
|
pub(crate) fn is_absolute(path: &Path) -> bool {
|
||||||
if cfg!(target_os = "redox") {
|
if cfg!(any(unix, target_os = "hermit", target_os = "wasi")) {
|
||||||
// FIXME: Allow Redox prefixes
|
|
||||||
path.has_root() || crate::path::has_redox_scheme(path.as_u8_slice())
|
|
||||||
} else if cfg!(any(unix, target_os = "hermit", target_os = "wasi")) {
|
|
||||||
path.has_root()
|
path.has_root()
|
||||||
} else {
|
} else {
|
||||||
path.has_root() && path.prefix().is_some()
|
path.has_root() && path.prefix().is_some()
|
||||||
|
|||||||
Reference in New Issue
Block a user