You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://docs.rs/camino/latest/camino/ ensures that the file path is utf8 and works on windows. Path uses OsSr under the hood, which allows non-utf8 strings. This is why there is pain when trying to go from a Path back to a &str. You either get an Option or a lossy string with invalid characters replaced with invalid character.
Enforcing utf-8 upfront means that .unwrap_unchecked can safely be used.
What would you like to see?
All instances of Path and PathBuf replaced with Utf8Path and Utf8PathBuf.
What alternatives are there?
The text was updated successfully, but these errors were encountered:
This is why there is pain when trying to go from a Path back to a &str. You either get an Option or a lossy string with invalid characters replaced with invalid character.
What problem does your feature solve?
https://docs.rs/camino/latest/camino/ ensures that the file path is utf8 and works on windows.
Path
usesOsSr
under the hood, which allows non-utf8 strings. This is why there is pain when trying to go from aPath
back to a &str. You either get an Option or a lossy string with invalid characters replaced with invalid character.Enforcing utf-8 upfront means that
.unwrap_unchecked
can safely be used.What would you like to see?
All instances of
Path
andPathBuf
replaced withUtf8Path
andUtf8PathBuf
.What alternatives are there?
The text was updated successfully, but these errors were encountered: