Skip to content

Use AsRef<Path> for paths#6

Open
sk1p wants to merge 1 commit into
elemeng:mainfrom
sk1p:asref-path
Open

Use AsRef<Path> for paths#6
sk1p wants to merge 1 commit into
elemeng:mainfrom
sk1p:asref-path

Conversation

@sk1p
Copy link
Copy Markdown

@sk1p sk1p commented Apr 28, 2026

Thank you for building the mrc crate! I stumbled over the use of &str for paths - this is a bit inconvenient, as in general, paths can be non-UTF8, so having to call Path::to_str() introduces a point of failure.

With this change, users of the API can use &str, &Path, PathBuf etc. instead of only UTF8-valid strings.

Some examples.

Users of the API can use &str, &Path, PathBuf etc. instead of only UTF8
strings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant