iddohau / rust-strings

Extracting strings from binary data
MIT License
6 stars 1 forks source link

Path type should be PathBuf or &Path, not &str #1

Closed sffc closed 2 years ago

sffc commented 2 years ago

The standard type in Rust for dealing with filesystem paths is &Path, or PathBuf for a fully-owned version. In order to interface with rust_strings, users need to convert their &Path to a String, which is a lossy operation since the Path need not be UTF-8 (though it often is).

CC @robertbastian

iddohau commented 2 years ago

Hi @sffc, Changing String to &Path make sense. I will probably do this in the next few days. Thanks for checking my repository 😄

iddohau commented 2 years ago

I have released new version containing this change 😄