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

Add peek_mut and peek_nth_mut to PeekNth #716

Merged
merged 3 commits into from
Oct 10, 2023

Conversation

zachs18
Copy link
Contributor

@zachs18 zachs18 commented Jul 26, 2023

which mirror std::iter::Peekable::peek_mut.

zachs18 and others added 3 commits October 9, 2023 12:57
which mirror `std::iter::Peekable::peek_mut`.
Use `into_iter` instead to avoid `&&`.
I did the same in `PeekNth::peek_nth_mut` to avoid `&mut &`.
@Philippe-Cholet
Copy link
Member

Philippe-Cholet commented Oct 9, 2023

@jswrenn @phimuemue PeekNth documentation says it's a drop-in replacement of core::iter::Peekable but the later has some methods added in recent enough Rust versions. I'll work on #734 after. Unless you think we should not, in which cases we would close them.
It can be merged now if you think it's okay.

EDIT: I just had to approve to merge this, I'm still discovering the maintainer part.

@Philippe-Cholet Philippe-Cholet added this pull request to the merge queue Oct 10, 2023
Merged via the queue into rust-itertools:master with commit a948086 Oct 10, 2023
8 checks passed
@Philippe-Cholet Philippe-Cholet added this to the next milestone Oct 10, 2023
@Philippe-Cholet
Copy link
Member

Philippe-Cholet commented Oct 10, 2023

@zachs18 Thanks for this pull request. The quickcheck test is particularly appreciated.

@jswrenn jswrenn mentioned this pull request Nov 14, 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