Closed Turtyo closed 3 weeks ago
@Turtyo Sounds great! This would be very useful for those using a Path
instead of &str
. And since str already implements AsRef
@Turtyo I've implemented this feature, and updated the native functions to accept parameters that can be referenced as a Path. Since this is completed, I will close this issue ✅
@silvia-odwyer Thank you !
Description
It is common for Rust functions interacting with the filesystem to not require
&str
(which is pretty cumbersome), but rather anything that can be referenced as aPath
(which includes&str
) Examples:Impact
str
already implementsAsRef<Path>
, see herePathBuf
the other day for example, and having to change to&str
was a bit bothersomeImplementation
I'm not sure, but it's likely we can just copy what is done by the examples I gave above