Skip to content

Commit 9ae413c

Browse files
authored
Rollup merge of rust-lang#41528 - steveklabnik:gh33269, r=frewsxcv
Clarify "side effect" in peek's docs Fixes rust-lang#33269 /cc @tshepang
2 parents e7f1c4f + 696df71 commit 9ae413c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/libcore/iter/iterator.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -629,8 +629,9 @@ pub trait Iterator {
629629
///
630630
/// Note that the underlying iterator is still advanced when [`peek`] is
631631
/// called for the first time: In order to retrieve the next element,
632-
/// [`next`] is called on the underlying iterator, hence any side effects of
633-
/// the [`next`] method will occur.
632+
/// [`next`] is called on the underlying iterator, hence any side effects (i.e.
633+
/// anything other than fetching the next value) of the [`next`] method
634+
/// will occur.
634635
///
635636
/// [`peek`]: struct.Peekable.html#method.peek
636637
/// [`next`]: ../../std/iter/trait.Iterator.html#tymethod.next

0 commit comments

Comments
 (0)