mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 01:05:39 +03:00
Rollup merge of #33409 - kindlychung:patch-2, r=steveklabnik
errors in the doc
This commit is contained in:
@@ -214,7 +214,7 @@ fn last(self) -> Option<Self::Item> where Self: Sized {
|
||||
/// Like most indexing operations, the count starts from zero, so `nth(0)`
|
||||
/// returns the first value, `nth(1)` the second, and so on.
|
||||
///
|
||||
/// `nth()` will return `None` if `n` is larger than the length of the
|
||||
/// `nth()` will return `None` if `n` is greater than or equal to the length of the
|
||||
/// iterator.
|
||||
///
|
||||
/// # Examples
|
||||
@@ -237,7 +237,7 @@ fn last(self) -> Option<Self::Item> where Self: Sized {
|
||||
/// assert_eq!(iter.nth(1), None);
|
||||
/// ```
|
||||
///
|
||||
/// Returning `None` if there are less than `n` elements:
|
||||
/// Returning `None` if there are less than `n + 1` elements:
|
||||
///
|
||||
/// ```
|
||||
/// let a = [1, 2, 3];
|
||||
|
||||
Reference in New Issue
Block a user