doc: a more simple description of Iterator::nth
This commit is contained in:
parent
7bccb829d0
commit
3e26a93a36
|
@ -195,13 +195,9 @@ pub trait Iterator {
|
||||||
last
|
last
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Consumes the `n` first elements of the iterator, then returns the
|
/// Returns the `n`th element of the iterator.
|
||||||
/// `next()` one.
|
|
||||||
///
|
///
|
||||||
/// This method will evaluate the iterator `n` times, discarding those elements.
|
/// Note that all preceding elements will be consumed (i.e. discarded).
|
||||||
/// After it does so, it will call [`next()`] and return its value.
|
|
||||||
///
|
|
||||||
/// [`next()`]: #tymethod.next
|
|
||||||
///
|
///
|
||||||
/// Like most indexing operations, the count starts from zero, so `nth(0)`
|
/// Like most indexing operations, the count starts from zero, so `nth(0)`
|
||||||
/// returns the first value, `nth(1)` the second, and so on.
|
/// returns the first value, `nth(1)` the second, and so on.
|
||||||
|
|
Loading…
Reference in New Issue