-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
cp: Use PathBuf instead of String for paths #4348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
GNU testsuite comparison:
|
Good idea! Could you add a small test for this with some invalid utf-8, so we don't regress? |
853905b
to
bca6c4c
Compare
Sure. |
GNU testsuite comparison:
|
1 similar comment
GNU testsuite comparison:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it! There are just some clippy lints to fix.
GNU testsuite comparison:
|
Looks like some test failures on macos and windows |
942003a
to
aaaef33
Compare
GNU testsuite comparison:
|
I think this should avoid unnecessarily validating utf-8, and avoids a few allocations.
hmm, it appears that mac won't actually let you create a file with an invalid utf-8 file name, and from some quick research windows might be similar? For now I've just restricted the tests to linux. |
GNU testsuite comparison:
|
GNU testsuite comparison:
|
I think this should avoid unnecessarily validating utf-8, and avoids a few allocations.