File tree 4 files changed +5
-4
lines changed
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 {
3199
3199
/// # fn main() {}
3200
3200
/// ```
3201
3201
///
3202
- /// The paths is resolved using [POSIX semantics][posix-semantics] except that
3202
+ /// The path is resolved using [POSIX semantics][posix-semantics] except that
3203
3203
/// it stops short of resolving symlinks. This means it will keep `..`
3204
3204
/// components and trailing slashes.
3205
3205
///
@@ -3231,7 +3231,7 @@ impl Error for StripPrefixError {
3231
3231
///
3232
3232
/// [posix-semantics]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13
3233
3233
/// [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 " ) ]
3235
3235
pub fn absolute < P : AsRef < Path > > ( path : P ) -> io:: Result < PathBuf > {
3236
3236
let path = path. as_ref ( ) ;
3237
3237
if path. as_os_str ( ) . is_empty ( ) {
Original file line number Diff line number Diff line change 1
1
use crate :: ffi:: OsStr ;
2
+ use crate :: io;
2
3
use crate :: path:: { Path , PathBuf , Prefix } ;
3
4
use crate :: sys:: unsupported;
4
5
Original file line number Diff line number Diff line change 1
1
use crate :: ffi:: OsStr ;
2
+ use crate :: io;
2
3
use crate :: path:: { Path , PathBuf , Prefix } ;
3
4
use crate :: sys:: unsupported;
4
5
Original file line number Diff line number Diff line change 1
1
use crate :: env;
2
2
use crate :: ffi:: OsStr ;
3
3
use crate :: io;
4
- use crate :: os:: unix:: ffi:: OsStrExt ;
5
4
use crate :: path:: { Path , PathBuf , Prefix } ;
6
5
7
6
#[ inline]
@@ -30,7 +29,7 @@ pub(crate) fn absolute(path: &Path) -> io::Result<PathBuf> {
30
29
// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13
31
30
32
31
let mut components = path. components ( ) ;
33
- let path_os = path. as_os_str ( ) . as_bytes ( ) ;
32
+ let path_os = path. as_os_str ( ) . bytes ( ) ;
34
33
35
34
let mut normalized = if path. is_absolute ( ) {
36
35
// "If a pathname begins with two successive <slash> characters, the
You can’t perform that action at this time.
0 commit comments