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

modify next_code_point() to accept an Iterator<u8> instead of Iterator<&u8>. Old code that calls it invokes .copied() #96019

Closed
wants to merge 1 commit into from

Conversation

mutantbob
Copy link

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().

…r<&u8>. Old code that calls it invokes .copied()
@rust-highfive
Copy link
Contributor

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with r? rust-lang/libs-api @rustbot label +T-libs-api to request review from a libs-api team reviewer. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • a stabilization of a library feature
  • introducing new or changes existing unstable library APIs
  • changes to public documentation in ways that create new stability guarantees

@rustbot rustbot added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Apr 13, 2022
@rust-highfive
Copy link
Contributor

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.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 13, 2022
@mutantbob
Copy link
Author

r? rust-lang/libs-api @rustbot label +T-libs-api

@rustbot rustbot added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Apr 13, 2022
@m-ou-se m-ou-se removed the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Apr 13, 2022
@m-ou-se
Copy link
Member

m-ou-se commented Apr 13, 2022

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.

@mutantbob
Copy link
Author

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

@JohnCSimon
Copy link
Member

ping from triage:
@mutantbob
Returning to you to address comments.

FYI: when a PR is ready for review, send a message containing
@rustbot ready to switch to S-waiting-on-review so the PR is in the reviewer's backlog.

@bors
Copy link
Collaborator

bors commented Jun 4, 2022

☔ The latest upstream changes (presumably #97729) made this pull request unmergeable. Please resolve the merge conflicts.

@JohnCSimon
Copy link
Member

ping from triage:
@mutantbob
seems I forgot to assign back to author....

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 3, 2022
@JohnCSimon
Copy link
Member

@mutantbob
Ping from triage: I'm closing this due to inactivity, Please reopen when you are ready to continue with this.
Note: if you do please open the PR BEFORE you push to it, else you won't be able to reopen - this is a quirk of github.
Thanks for your contribution.

@rustbot label: +S-inactive

@JohnCSimon JohnCSimon closed this Jul 24, 2022
@rustbot rustbot added the S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. label Jul 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants