Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove 'useless' unsafe? #2819

Closed
wants to merge 1 commit into from

Conversation

bilaliscarioth
Copy link

Hello ?

Sorry, I just don't understand the use of the std::from_utf8_unchecked function when you can simply use str::from_utf8. Which doesn't break serde (even with a cargo test everything looks ok.

Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added deliberately in #2001.

@bilaliscarioth
Copy link
Author

I guess you tested just in case, so I guess I can close this sweater request?

@dtolnay
Copy link
Member

dtolnay commented Sep 6, 2024

Yeah — I am inclined to keep the current implementation.

Thanks anyway for the PR!

@dtolnay dtolnay closed this Sep 6, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants