]> git.lizzy.rs Git - rust.git/commitdiff
Correct Iterator trait documentation
authorMichael Huynh <miqid@outlook.com>
Mon, 22 Feb 2016 14:02:40 +0000 (22:02 +0800)
committerMichael Huynh <miqid@outlook.com>
Mon, 22 Feb 2016 14:02:40 +0000 (22:02 +0800)
Fixes several minor spelling errors and includes a suggested style fix.

src/libcore/iter.rs

index 3f1808a03967d82d4ec39479d3745a547e0e2cde..96302acb8d960f1c94b8691ca4c0f2e5d83279ba 100644 (file)
@@ -1428,7 +1428,7 @@ fn by_ref(&mut self) -> &mut Self where Self: Sized { self }
     /// assert_eq!(6, doubled[2]);
     /// ```
     ///
-    /// Using the 'turbofish' instead of annotationg `doubled`:
+    /// Using the 'turbofish' instead of annotating `doubled`:
     ///
     /// ```
     /// let a = [1, 2, 3];
@@ -1610,7 +1610,7 @@ fn fold<B, F>(self, init: B, mut f: F) -> B where
     /// `true`, then so does `all()`. If any of them return `false`, it
     /// returns `false`.
     ///
-    /// `all()` is short-circuting; in other words, it will stop processing
+    /// `all()` is short-circuiting; in other words, it will stop processing
     /// as soon as it finds a `false`, given that no matter what else happens,
     /// the result will also be `false`.
     ///
@@ -1660,7 +1660,7 @@ fn all<F>(&mut self, mut f: F) -> bool where
     /// `true`, then so does `any()`. If they all return `false`, it
     /// returns `false`.
     ///
-    /// `any()` is short-circuting; in other words, it will stop processing
+    /// `any()` is short-circuiting; in other words, it will stop processing
     /// as soon as it finds a `true`, given that no matter what else happens,
     /// the result will also be `true`.
     ///
@@ -1711,7 +1711,7 @@ fn any<F>(&mut self, mut f: F) -> bool where
     /// `true`, then `find()` returns `Some(element)`. If they all return
     /// `false`, it returns `None`.
     ///
-    /// `find()` is short-circuting; in other words, it will stop processing
+    /// `find()` is short-circuiting; in other words, it will stop processing
     /// as soon as the closure returns `true`.
     ///
     /// Because `find()` takes a reference, and many iterators iterate over
@@ -1762,7 +1762,7 @@ fn find<P>(&mut self, mut predicate: P) -> Option<Self::Item> where
     /// returns `true`, then `position()` returns `Some(index)`. If all of
     /// them return `false`, it returns `None`.
     ///
-    /// `position()` is short-circuting; in other words, it will stop
+    /// `position()` is short-circuiting; in other words, it will stop
     /// processing as soon as it finds a `true`.
     ///
     /// # Overflow Behavior
@@ -1824,7 +1824,7 @@ fn position<P>(&mut self, mut predicate: P) -> Option<usize> where
     /// and if one of them returns `true`, then `rposition()` returns
     /// `Some(index)`. If all of them return `false`, it returns `None`.
     ///
-    /// `rposition()` is short-circuting; in other words, it will stop
+    /// `rposition()` is short-circuiting; in other words, it will stop
     /// processing as soon as it finds a `true`.
     ///
     /// # Examples
@@ -2079,7 +2079,7 @@ fn size_hint(&self) -> (usize, Option<usize>) {
         (ts, us)
     }
 
-    /// Creates an iterator which clone()s all of its elements.
+    /// Creates an iterator which `clone()`s all of its elements.
     ///
     /// This is useful when you have an iterator over `&T`, but you need an
     /// iterator over `T`.