Skip to content

Use AsRef<Path> for paths#6

Merged
elemeng merged 1 commit into
elemeng:mainfrom
sk1p:asref-path
May 19, 2026
Merged

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

Conversation

@sk1p

@sk1p sk1p commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

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.
@elemeng elemeng merged commit 09a0842 into elemeng:main May 19, 2026
1 check failed
@sk1p sk1p deleted the asref-path branch May 19, 2026 12:03
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.

2 participants