From 696df71d0c442dba82f52f2b985feb0e1431bd60 Mon Sep 17 00:00:00 2001 From: steveklabnik Date: Tue, 25 Apr 2017 05:38:26 -0400 Subject: Clarify "side effect" in peek's docs Fixes #33269 --- src/libcore/iter/iterator.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/libcore/iter/iterator.rs') diff --git a/src/libcore/iter/iterator.rs b/src/libcore/iter/iterator.rs index 3ad91ef15ea..b3f4d75c4da 100644 --- a/src/libcore/iter/iterator.rs +++ b/src/libcore/iter/iterator.rs @@ -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 -- cgit 1.4.1-3-g733a5