We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3157691 commit 2ca3120Copy full SHA for 2ca3120
src/libcore/iter/iterator.rs
@@ -214,7 +214,7 @@ pub trait Iterator {
214
/// Like most indexing operations, the count starts from zero, so `nth(0)`
215
/// returns the first value, `nth(1)` the second, and so on.
216
///
217
- /// `nth()` will return `None` if `n` is larger than the length of the
+ /// `nth()` will return `None` if `n` >= the length of the
218
/// iterator.
219
220
/// # Examples
@@ -237,7 +237,7 @@ pub trait Iterator {
237
/// assert_eq!(iter.nth(1), None);
238
/// ```
239
240
- /// Returning `None` if there are less than `n` elements:
+ /// Returning `None` if there are less than `n + 1` elements:
241
242
243
/// let a = [1, 2, 3];
0 commit comments