Skip to content

Commit 721dc47

Browse files
committed
doc/core: fix description of nth function
The "nth" element can be confusing. In an array context, we know indexes start from 0 but one may believe this is not the case with "nth". For example, would `.nth(1)` return the first (1th/1st) or the second element? Rephrase a bit to be less confusing.
1 parent cbf4c34 commit 721dc47

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/libcore/iter.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,7 @@ pub trait Iterator {
148148
last
149149
}
150150

151-
/// Loops through `n` iterations, returning the `n`th element of the
152-
/// iterator.
151+
/// Skips the `n` first elements of the iterator and returns the next one.
153152
///
154153
/// # Examples
155154
///

0 commit comments

Comments
 (0)