about summary refs log tree commit diff
path: root/library/std/src/sys/unix/path.rs
diff options
context:
space:
mode:
authorEd Page <eopage@gmail.com>2023-05-13 18:47:14 +0200
committerEd Page <eopage@gmail.com>2023-05-13 18:47:14 +0200
commit7f1a6cd421d699aa249a282d7b5b7a8f486e3b01 (patch)
tree511041437bc484108fb22ec179cd2c8134ec93e3 /library/std/src/sys/unix/path.rs
parent8d2beb50c2b228f4bd6f8e2d81d82c9e1f5e5ba2 (diff)
downloadrust-7f1a6cd421d699aa249a282d7b5b7a8f486e3b01.tar.gz
rust-7f1a6cd421d699aa249a282d7b5b7a8f486e3b01.zip
refactor: Remove redundant, private OsStr::bytes
Diffstat (limited to 'library/std/src/sys/unix/path.rs')
-rw-r--r--library/std/src/sys/unix/path.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/unix/path.rs b/library/std/src/sys/unix/path.rs
index a98a69e2db8..935245f637b 100644
--- a/library/std/src/sys/unix/path.rs
+++ b/library/std/src/sys/unix/path.rs
@@ -30,7 +30,7 @@ pub(crate) fn absolute(path: &Path) -> io::Result<PathBuf> {
 
     // Get the components, skipping the redundant leading "." component if it exists.
     let mut components = path.strip_prefix(".").unwrap_or(path).components();
-    let path_os = path.as_os_str().bytes();
+    let path_os = path.as_os_str().as_os_str_bytes();
 
     let mut normalized = if path.is_absolute() {
         // "If a pathname begins with two successive <slash> characters, the