Closed
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.