Clarify "side effect" in peek's docs

Fixes #33269
This commit is contained in:
steveklabnik 2017-04-25 05:38:26 -04:00
parent 15ce54096a
commit 696df71d0c

View File

@ -629,8 +629,9 @@ fn enumerate(self) -> Enumerate<Self> where Self: Sized {
///
/// Note that the underlying iterator is still advanced when [`peek`] is
/// called for the first time: In order to retrieve the next element,
/// [`next`] is called on the underlying iterator, hence any side effects of
/// the [`next`] method will occur.
/// [`next`] is called on the underlying iterator, hence any side effects (i.e.
/// anything other than fetching the next value) of the [`next`] method
/// will occur.
///
/// [`peek`]: struct.Peekable.html#method.peek
/// [`next`]: ../../std/iter/trait.Iterator.html#tymethod.next