File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -901,12 +901,17 @@ pub trait Iterator {
901901 Enumerate { iter : self , count : 0 }
902902 }
903903
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.
906906 ///
907907 /// Adds a [`peek()`] method to an iterator. See its documentation for
908908 /// more information.
909909 ///
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+ ///
910915 /// [`peek()`]: struct.Peekable.html#method.peek
911916 ///
912917 /// # Examples
You can’t perform that action at this time.
0 commit comments