about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorRob Speer <rob@luminoso.com>2017-02-10 01:35:29 -0500
committerRob Speer <rob@luminoso.com>2017-02-10 01:35:29 -0500
commit11d36aec8317dba64e30b98aad75c70e4eed6b3e (patch)
tree4a947424206b149d7b3dfa6e98aed607dd4c4c65 /src/libcore
parentebf29ef0733ec0ac13ef16eb42bac17e3b94da3c (diff)
downloadrust-11d36aec8317dba64e30b98aad75c70e4eed6b3e.tar.gz
rust-11d36aec8317dba64e30b98aad75c70e4eed6b3e.zip
iterator docs: Move paragraph about discarding; clarify "consumed"
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/iter/iterator.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libcore/iter/iterator.rs b/src/libcore/iter/iterator.rs
index 4a8c8b53a8c..d41767cce18 100644
--- a/src/libcore/iter/iterator.rs
+++ b/src/libcore/iter/iterator.rs
@@ -209,14 +209,14 @@ pub trait Iterator {
 
     /// Returns the `n`th element of the iterator.
     ///
-    /// Note that all preceding elements, as well as the returned element, will be
-    /// consumed. That means that the preceding elements will be discarded, and also
-    /// that calling `nth(0)` multiple times on the same iterator will return different
-    /// elements.
-    ///
     /// Like most indexing operations, the count starts from zero, so `nth(0)`
     /// returns the first value, `nth(1)` the second, and so on.
     ///
+    /// Note that all preceding elements, as well as the returned element, will be
+    /// consumed from the iterator. That means that the preceding elements will be
+    /// discarded, and also that calling `nth(0)` multiple times on the same iterator
+    /// will return different elements.
+    ///
     /// `nth()` will return [`None`] if `n` is greater than or equal to the length of the
     /// iterator.
     ///