Skip to content

Conversation

herlev
Copy link

@herlev herlev commented Aug 21, 2023

Fixes #733 by adding support for next_if and next_if_eq

Similarly, `Peekable::next_if` does not "peek" before calling "next" either.
@Philippe-Cholet Philippe-Cholet added this to the next milestone Oct 10, 2023
@Philippe-Cholet
Copy link
Member

Philippe-Cholet commented Oct 10, 2023

Side note: I will add a quickcheck test soon.

@herlev Thanks for this pull request.

Same as `test_peek_nth_peeking_next` (copied/pasted/updated) but with `next_if[_eq]` instead of using `peeking_next` from our `itertools::PeekingNext` trait.
Copy link
Member

@Philippe-Cholet Philippe-Cholet left a comment

Choose a reason for hiding this comment

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

I started by checking that core::iter::Peekable has the same function signatures.

@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 0951795 Oct 10, 2023
@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

2 participants