File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -901,12 +901,17 @@ pub trait Iterator {
901
901
Enumerate { iter : self , count : 0 }
902
902
}
903
903
904
- /// Creates an iterator which can look at the ` next()` element without
905
- /// consuming it.
904
+ /// Creates an iterator which can use `peek` to look at the next element of
905
+ /// the iterator without consuming it.
906
906
///
907
907
/// Adds a [`peek()`] method to an iterator. See its documentation for
908
908
/// more information.
909
909
///
910
+ /// Note that the underlying iterator is still advanced when `peek` is
911
+ /// called for the first time: In order to retrieve the next element,
912
+ /// `next` is called on the underlying iterator, hence any side effects of
913
+ /// the `next` method will occur.
914
+ ///
910
915
/// [`peek()`]: struct.Peekable.html#method.peek
911
916
///
912
917
/// # Examples
You can’t perform that action at this time.
0 commit comments