mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-04 09:53:04 +03:00
Describe the Iterator enumerate() method more clearly.
This commit is contained in:
+3
-2
@@ -273,8 +273,9 @@ fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F> where
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user