Skip to content
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

head: use OsStringExt::from_vec instead of std::from_utf8_unchecked #4923

Merged
merged 1 commit into from
May 31, 2023

Conversation

tertsdiepraam
Copy link
Member

This no longer triggers the invalid_from_utf8_unchecked lint. It is also a bit cleaner and no longer requires unsafe because OsString is not guaranteed to be valid UTF-8.

I noticed the lint here: https:/uutils/coreutils/actions/runs/5134271496/jobs/9238032149?pr=4747

cc @cakebaker

This no longer triggers the `invalid_from_utf8_unchecked` lint. It
is also a bit cleaner and no longer requires `unsafe` because
OsString is not guaranteed to be valid UTF-8.
@tertsdiepraam tertsdiepraam changed the title head: use OsStringExt::from_vec instead of std::from_utf8_unchecked head: use OsStringExt::from_vec instead of std::from_utf8_unchecked May 31, 2023
@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/rm/rm2 is no longer failing!
GNU test failed: tests/tail-2/inotify-dir-recreate. tests/tail-2/inotify-dir-recreate is passing on 'main'. Maybe you have to rebase?

@sylvestre sylvestre merged commit 77e1839 into uutils:main May 31, 2023
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