about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-08-11 13:26:46 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-08-11 16:48:02 +0530
commit93f8031303feef0fc53354e44d19a825440fcbd5 (patch)
tree56cc75c1c60abf4277ad6fb81c32e0b0c4ac5d11
parenta917f61569e7d291a9d8c8faa76f287ee9f49253 (diff)
parent721dc47a6996f0c418ed515701142d79846c8e10 (diff)
downloadrust-93f8031303feef0fc53354e44d19a825440fcbd5.tar.gz
rust-93f8031303feef0fc53354e44d19a825440fcbd5.zip
Rollup merge of #27612 - vincentbernat:fix/doc/iter-nth, r=steveklabnik
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.

r? @steveklabnik
-rw-r--r--src/libcore/iter.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs
index 2968d634544..3382095b456 100644
--- a/src/libcore/iter.rs
+++ b/src/libcore/iter.rs
@@ -148,8 +148,7 @@ pub trait Iterator {
         last
     }
 
-    /// Loops through `n` iterations, returning the `n`th element of the
-    /// iterator.
+    /// Skips the `n` first elements of the iterator and returns the next one.
     ///
     /// # Examples
     ///