From 81cc3afe20d994d9c7cba4e75c3eed92bf98a402 Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Thu, 9 Dec 2021 14:31:22 +0000 Subject: Fix `absolute` issues --- library/std/src/sys/sgx/path.rs | 1 + library/std/src/sys/solid/path.rs | 1 + library/std/src/sys/unix/path.rs | 3 +-- 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'library/std/src/sys') diff --git a/library/std/src/sys/sgx/path.rs b/library/std/src/sys/sgx/path.rs index 9cfc61bf174..c805c15e702 100644 --- a/library/std/src/sys/sgx/path.rs +++ b/library/std/src/sys/sgx/path.rs @@ -1,4 +1,5 @@ use crate::ffi::OsStr; +use crate::io; use crate::path::{Path, PathBuf, Prefix}; use crate::sys::unsupported; diff --git a/library/std/src/sys/solid/path.rs b/library/std/src/sys/solid/path.rs index ed532dc989b..7045c9be25b 100644 --- a/library/std/src/sys/solid/path.rs +++ b/library/std/src/sys/solid/path.rs @@ -1,4 +1,5 @@ use crate::ffi::OsStr; +use crate::io; use crate::path::{Path, PathBuf, Prefix}; use crate::sys::unsupported; 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 { // 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 characters, the -- cgit 1.4.1-3-g733a5