File tree Expand file tree Collapse file tree 4 files changed +5
-4
lines changed Expand file tree Collapse file tree 4 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -3199,7 +3199,7 @@ impl Error for StripPrefixError {
31993199/// # fn main() {}
32003200/// ```
32013201///
3202- /// The paths is resolved using [POSIX semantics][posix-semantics] except that
3202+ /// The path is resolved using [POSIX semantics][posix-semantics] except that
32033203/// it stops short of resolving symlinks. This means it will keep `..`
32043204/// components and trailing slashes.
32053205///
@@ -3231,7 +3231,7 @@ impl Error for StripPrefixError {
32313231///
32323232/// [posix-semantics]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13
32333233/// [windows-path]: https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfullpathnamew
3234- #[ unstable( feature = "absolute_path" , issue = "none " ) ]
3234+ #[ unstable( feature = "absolute_path" , issue = "92750 " ) ]
32353235pub fn absolute < P : AsRef < Path > > ( path : P ) -> io:: Result < PathBuf > {
32363236 let path = path. as_ref ( ) ;
32373237 if path. as_os_str ( ) . is_empty ( ) {
Original file line number Diff line number Diff line change 11use crate :: ffi:: OsStr ;
2+ use crate :: io;
23use crate :: path:: { Path , PathBuf , Prefix } ;
34use crate :: sys:: unsupported;
45
Original file line number Diff line number Diff line change 11use crate :: ffi:: OsStr ;
2+ use crate :: io;
23use crate :: path:: { Path , PathBuf , Prefix } ;
34use crate :: sys:: unsupported;
45
Original file line number Diff line number Diff line change 11use crate :: env;
22use crate :: ffi:: OsStr ;
33use crate :: io;
4- use crate :: os:: unix:: ffi:: OsStrExt ;
54use crate :: path:: { Path , PathBuf , Prefix } ;
65
76#[ inline]
@@ -30,7 +29,7 @@ pub(crate) fn absolute(path: &Path) -> io::Result<PathBuf> {
3029 // https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13
3130
3231 let mut components = path. components ( ) ;
33- let path_os = path. as_os_str ( ) . as_bytes ( ) ;
32+ let path_os = path. as_os_str ( ) . bytes ( ) ;
3433
3534 let mut normalized = if path. is_absolute ( ) {
3635 // "If a pathname begins with two successive <slash> characters, the
You can’t perform that action at this time.
0 commit comments