Skip to content

Commit 2ca3120

Browse files
committed
errors in the doc
1 parent 3157691 commit 2ca3120

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcore/iter/iterator.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ pub trait Iterator {
214214
/// Like most indexing operations, the count starts from zero, so `nth(0)`
215215
/// returns the first value, `nth(1)` the second, and so on.
216216
///
217-
/// `nth()` will return `None` if `n` is larger than the length of the
217+
/// `nth()` will return `None` if `n` >= the length of the
218218
/// iterator.
219219
///
220220
/// # Examples
@@ -237,7 +237,7 @@ pub trait Iterator {
237237
/// assert_eq!(iter.nth(1), None);
238238
/// ```
239239
///
240-
/// Returning `None` if there are less than `n` elements:
240+
/// Returning `None` if there are less than `n + 1` elements:
241241
///
242242
/// ```
243243
/// let a = [1, 2, 3];

0 commit comments

Comments
 (0)