-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
modify next_code_point() to accept an Iterator<u8> instead of Iterator<&u8>. Old code that calls it invokes .copied() #96019
Conversation
…r<&u8>. Old code that calls it invokes .copied()
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @m-ou-se (or someone else) soon. Please see the contribution instructions for more information. |
r? rust-lang/libs-api @rustbot label +T-libs-api |
The str_internals feature isn't meant to be used outside the standard library: it's called 'internal', and it doesn't even have a tracking issue. Your changes don't seem to improve the usage of this function within the standard library, with the only motivation coming from external usage of this internal feature. We can discuss a proposal for adding a public api for this, but we shouldn't change permanently unstable internal-only APIs to suit external needs. Internal functions like these do often have a sub-par design because they only exist for specific needs inside the standard library. Public APIs are held to a higher standard, and need a bit more design and discussion in general. |
Understood. If there is no support for making this API public I can duplicate the code and figure out how to publish it as a crate for use by applications like mine that need this functionality |
ping from triage: FYI: when a PR is ready for review, send a message containing |
☔ The latest upstream changes (presumably #97729) made this pull request unmergeable. Please resolve the merge conflicts. |
ping from triage: @rustbot author |
@mutantbob @rustbot label: +S-inactive |
next_code_point() required an Iterator<Item=&u8> and I only have an Iterator<Item=u8> ; so I have modified next_code_point() to accept an Iterator<Item=u8>. Code that used the old next_code_point() gets modified to call (&mut self.iter).copied().
I threw in some unit tests because I want some confidence that I didn't break anything.
This pull request is an alternate to #95788 . This one is a little less architecturally messy, but will break any external code that was invoking next_code_point().