about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2017-04-25 23:05:59 -0400
committerGitHub <noreply@github.com>2017-04-25 23:05:59 -0400
commit9ae413c3864475f8d6a89e7f40bf2300df2ade4b (patch)
tree287ea92c5b3429051a4976d3cd6ac5ccc66e403e /src
parente7f1c4fd14b04bf543b24bc587fd9f3d39c9f7da (diff)
parent696df71d0c442dba82f52f2b985feb0e1431bd60 (diff)
downloadrust-9ae413c3864475f8d6a89e7f40bf2300df2ade4b.tar.gz
rust-9ae413c3864475f8d6a89e7f40bf2300df2ade4b.zip
Rollup merge of #41528 - steveklabnik:gh33269, r=frewsxcv
Clarify "side effect" in peek's docs

Fixes #33269

/cc @tshepang
Diffstat (limited to 'src')
-rw-r--r--src/libcore/iter/iterator.rs5
1 files changed, 3 insertions, 2 deletions
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