We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
next()
peek()
MultiPeek
1 parent 59cb6f5 commit 8998202Copy full SHA for 8998202
src/multipeek_impl.rs
@@ -38,6 +38,7 @@ impl<I: Iterator> MultiPeek<I> {
38
/// Works exactly like `.next()` with the only difference that it doesn't
39
/// advance itself. `.peek()` can be called multiple times, to peek
40
/// further ahead.
41
+ /// When `.next()` is called, reset the peeking “cursor”.
42
pub fn peek(&mut self) -> Option<&I::Item> {
43
let ret = if self.index < self.buf.len() {
44
Some(&self.buf[self.index])
0 commit comments