diff options
| author | Corey Farwell <coreyf@rwell.org> | 2017-04-25 23:05:59 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-25 23:05:59 -0400 |
| commit | 9ae413c3864475f8d6a89e7f40bf2300df2ade4b (patch) | |
| tree | 287ea92c5b3429051a4976d3cd6ac5ccc66e403e /src | |
| parent | e7f1c4fd14b04bf543b24bc587fd9f3d39c9f7da (diff) | |
| parent | 696df71d0c442dba82f52f2b985feb0e1431bd60 (diff) | |
| download | rust-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.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 |
