Skip to content

Commit

Permalink
Rollup merge of rust-lang#41528 - steveklabnik:gh33269, r=frewsxcv
Browse files Browse the repository at this point in the history
Clarify "side effect" in peek's docs

Fixes rust-lang#33269

/cc @tshepang
  • Loading branch information
Ariel Ben-Yehuda authored Apr 25, 2017
2 parents f52af0b + 696df71 commit 72dc0f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/libcore/iter/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -629,8 +629,9 @@ pub trait Iterator {
///
/// 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
Expand Down

0 comments on commit 72dc0f0

Please sign in to comment.