Closed Nemo157 closed 1 year ago
@Nemo157 added AsRef<Path>
for Utf8NativePath
and Utf8NativePathBuf
alongside From<Utf8NativePathBuf>
for PathBuf
. You can find this included in the newly-published 0.4.1
of the crate.
See the 0.4.1 AsRef doc example for more information.
Let me know if you need anything else!
I have a tool where I'm having to deal with both unix and native paths together (and converting between them). When interacting with the filesystem I want to obviously only use the native paths, but since I'm having to go via
.as_str()
there's nothing actually enforcing this. If there was theAsRef<Path>
impl for only the correct encoding then I would have some implicit checks that I'm using the correct variant.