diff options
| author | steveklabnik <steve@steveklabnik.com> | 2017-04-25 05:38:26 -0400 |
|---|---|---|
| committer | steveklabnik <steve@steveklabnik.com> | 2017-04-25 05:38:26 -0400 |
| commit | 696df71d0c442dba82f52f2b985feb0e1431bd60 (patch) | |
| tree | b38a0daa0c012fe0b63af951930b73fb24dcc615 /src/libcore | |
| parent | 15ce54096a589de277771ad1f55a334fe2661a64 (diff) | |
| download | rust-696df71d0c442dba82f52f2b985feb0e1431bd60.tar.gz rust-696df71d0c442dba82f52f2b985feb0e1431bd60.zip | |
Clarify "side effect" in peek's docs
Fixes #33269
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/iter/iterator.rs | 5 |
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 |
