Describe the Iterator enumerate() method more clearly.
This commit is contained in:
parent
8415fa2787
commit
2b86f1f428
|
@ -273,8 +273,9 @@ pub trait Iterator {
|
||||||
FilterMap { iter: self, f: f }
|
FilterMap { iter: self, f: f }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates an iterator that yields a pair of the value returned by this
|
/// Creates an iterator that yields pairs `(i, val)` where `i` is the
|
||||||
/// iterator plus the current index of iteration.
|
/// 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
|
/// `enumerate` keeps its count as a `usize`. If you want to count by a
|
||||||
/// different sized integer, the `zip` function provides similar
|
/// different sized integer, the `zip` function provides similar
|
||||||
|
|
Loading…
Reference in New Issue