rust-itertools / itertools

Extra iterator adaptors, iterator methods, free functions, and macros.
https://docs.rs/itertools/
Apache License 2.0
2.72k stars 309 forks source link

Support for `next_if` and `next_if_eq` on PeekNth #733

Closed herlev closed 1 year ago

herlev commented 1 year ago

Currently the documentation for itertools::peek_nth says:

A drop-in replacement for std::iter::Peekable which adds a peek_nth method allowing the user to peek at a value several iterations forward without advancing the base iterator.

It is however not a drop-in replacement at the moment, since the methods next_if and next_if_eq isn't implemented.