diff options
| author | Nick Hamann <nick@wabbo.org> | 2015-04-14 20:11:37 -0500 |
|---|---|---|
| committer | Nick Hamann <nick@wabbo.org> | 2015-04-15 13:38:23 -0500 |
| commit | 2b86f1f428ace09dbf79c0bf75a7dd06fb6441e2 (patch) | |
| tree | 261cfff523b4b44087bcb6fa73174c7eff8b475e /src/libcore | |
| parent | 8415fa27877a4309a79b08c75a52eb4c3546b7a5 (diff) | |
| download | rust-2b86f1f428ace09dbf79c0bf75a7dd06fb6441e2.tar.gz rust-2b86f1f428ace09dbf79c0bf75a7dd06fb6441e2.zip | |
Describe the Iterator enumerate() method more clearly.
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/iter.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index c756d3cb9c2..eed8edb7a52 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -273,8 +273,9 @@ pub trait Iterator { FilterMap { iter: self, f: f } } - /// Creates an iterator that yields a pair of the value returned by this - /// iterator plus the current index of iteration. + /// Creates an iterator that yields pairs `(i, val)` where `i` is the + /// current index of iteration and `val` is the value returned by the + /// iterator. /// /// `enumerate` keeps its count as a `usize`. If you want to count by a /// different sized integer, the `zip` function provides similar |
