diff options
| author | Chris Denton <christophersdenton@gmail.com> | 2021-12-09 14:31:22 +0000 |
|---|---|---|
| committer | Chris Denton <christophersdenton@gmail.com> | 2022-02-08 14:57:35 +0000 |
| commit | 81cc3afe20d994d9c7cba4e75c3eed92bf98a402 (patch) | |
| tree | e051c834d7ac56c79e46fc8dc06575f70eb77acc /library/std/src/sys/unix/path.rs | |
| parent | d59d32c4f11ce35a4969f9136942b97074b35168 (diff) | |
| download | rust-81cc3afe20d994d9c7cba4e75c3eed92bf98a402.tar.gz rust-81cc3afe20d994d9c7cba4e75c3eed92bf98a402.zip | |
Fix `absolute` issues
Diffstat (limited to 'library/std/src/sys/unix/path.rs')
| -rw-r--r-- | library/std/src/sys/unix/path.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/library/std/src/sys/unix/path.rs b/library/std/src/sys/unix/path.rs index 1fdabab4598..6d6f4c8b8dc 100644 --- a/library/std/src/sys/unix/path.rs +++ b/library/std/src/sys/unix/path.rs @@ -1,7 +1,6 @@ use crate::env; use crate::ffi::OsStr; use crate::io; -use crate::os::unix::ffi::OsStrExt; use crate::path::{Path, PathBuf, Prefix}; #[inline] @@ -30,7 +29,7 @@ pub(crate) fn absolute(path: &Path) -> io::Result<PathBuf> { // https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13 let mut components = path.components(); - let path_os = path.as_os_str().as_bytes(); + let path_os = path.as_os_str().bytes(); let mut normalized = if path.is_absolute() { // "If a pathname begins with two successive <slash> characters, the |
