diff options
Diffstat (limited to 'src/multipeek_impl.rs')
-rw-r--r-- | src/multipeek_impl.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/multipeek_impl.rs b/src/multipeek_impl.rs index 986e5b4..5917681 100644 --- a/src/multipeek_impl.rs +++ b/src/multipeek_impl.rs @@ -3,7 +3,7 @@ use alloc::collections::VecDeque; use crate::size_hint; use crate::PeekingNext; -/// See [`multipeek()`](../fn.multipeek.html) for more information. +/// See [`multipeek()`] for more information. #[derive(Clone, Debug)] pub struct MultiPeek<I> where I: Iterator @@ -38,6 +38,7 @@ impl<I: Iterator> MultiPeek<I> { /// Works exactly like `.next()` with the only difference that it doesn't /// advance itself. `.peek()` can be called multiple times, to peek /// further ahead. + /// When `.next()` is called, reset the peeking “cursor”. pub fn peek(&mut self) -> Option<&I::Item> { let ret = if self.index < self.buf.len() { Some(&self.buf[self.index]) |