Currently, imwrite, imread, etc. take &str as the path argument. This is kind of annoying if you're dealing with std::path::Paths, which have to be turned into &strs. Is there a reason we can't accept AsRef<Path> there instead? This would allow callers to pass &str/String OR Path/PathBuf. Accepting this can even be done with a macro, if code aesthetics is a concern. It's also possible to do this without generics by accepting impl AsRef<Path>.
Currently,
imwrite,imread, etc. take&stras the path argument. This is kind of annoying if you're dealing withstd::path::Paths, which have to be turned into&strs. Is there a reason we can't acceptAsRef<Path>there instead? This would allow callers to pass&str/StringORPath/PathBuf. Accepting this can even be done with a macro, if code aesthetics is a concern. It's also possible to do this without generics by acceptingimpl AsRef<Path>.