We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c3802f6 + 3e26a93 commit 1c2d223Copy full SHA for 1c2d223
src/libcore/iter/iterator.rs
@@ -195,13 +195,9 @@ pub trait Iterator {
195
last
196
}
197
198
- /// Consumes the `n` first elements of the iterator, then returns the
199
- /// `next()` one.
+ /// Returns the `n`th element of the iterator.
200
///
201
- /// This method will evaluate the iterator `n` times, discarding those elements.
202
- /// After it does so, it will call [`next()`] and return its value.
203
- ///
204
- /// [`next()`]: #tymethod.next
+ /// Note that all preceding elements will be consumed (i.e. discarded).
205
206
/// Like most indexing operations, the count starts from zero, so `nth(0)`
207
/// returns the first value, `nth(1)` the second, and so on.
0 commit comments