-
Couldn't load subscription status.
- Fork 13.9k
Closed
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
Location
https://doc.rust-lang.org/stable/std/ffi/struct.OsString.html#method.into_encoded_bytes
Summary
contains this line:
To convert the byte slice back into an OsString, use the OsStr::from_encoded_bytes_unchecked function
however, if you want a proper round trip, you need to use OsString::from_encoded_bytes_unchecked, which actually consumes the Vec instead of taking a byte slice.
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.