-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Rename std::io::Read::chars to utf8_chars. #33761
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
Unlike `str::chars` where UTF-8 is implied since that’s always the encoding of `str` (whose contents is guaranteed to be well-formed), the bytes read from `io::Read` are arbitrary.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Hm, I mean, |
The
|
It might make sense to hold off on merging this until the other problems with |
I think making UTF-8 explicit in the name is orthogonal to all of these issues. Similar to how we have both |
Unlike `str::chars` where UTF-8 is implied since that’s always the encoding of `str` (whose contents is guaranteed to be well-formed), the bytes read from `io::Read` are arbitrary. Fixes rust-lang#33761.
I'm gonna close this in favor of #33801 as it looks like it's included there and cuts down on the number of PRs, thanks though @SimonSapin! |
Yes, I meant to do this and forgot. |
Unlike
str::chars
where UTF-8 is implied since that’s always the encoding ofstr
(whose contents is guaranteed to be well-formed), the bytes read fromio::Read
are arbitrary.