about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2016-10-22 01:22:00 +0200
committerGitHub <noreply@github.com>2016-10-22 01:22:00 +0200
commit1c2d2235c976a14c4e17e9d258e3e0a500078409 (patch)
tree82f76281ba5d56a62db28de7728f4b61a03255da /src/libcore
parentc3802f678935893bcc0dc1e426a40498325ccafa (diff)
parent3e26a93a36ccf5239ed5102bcc66bb72d3bc9251 (diff)
Rollup merge of #37314 - tshepang:simple, r=GuillaumeGomez
doc: a more simple description of Iterator::nth
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/iter/iterator.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/libcore/iter/iterator.rs b/src/libcore/iter/iterator.rs
index 0e74bbe9c26..5a12f5db19d 100644
--- a/src/libcore/iter/iterator.rs
+++ b/src/libcore/iter/iterator.rs
@@ -195,13 +195,9 @@ pub trait Iterator {
         last
     }
 
-    /// Consumes the `n` first elements of the iterator, then returns the
-    /// `next()` one.
+    /// Returns the `n`th element of the iterator.
     ///
-    /// This method will evaluate the iterator `n` times, discarding those elements.
-    /// After it does so, it will call [`next()`] and return its value.
-    ///
-    /// [`next()`]: #tymethod.next
+    /// Note that all preceding elements will be consumed (i.e. discarded).
     ///
     /// Like most indexing operations, the count starts from zero, so `nth(0)`
     /// returns the first value, `nth(1)` the second, and so on.