]> git.lizzy.rs Git - rust.git/commitdiff
Indicate None is code-like in doc comments
authorCorey Farwell <coreyf@rwell.org>
Thu, 16 Apr 2015 15:53:17 +0000 (11:53 -0400)
committerCorey Farwell <coreyf@rwell.org>
Thu, 16 Apr 2015 15:53:17 +0000 (11:53 -0400)
src/libcore/iter.rs

index e44b0d1147cbcb86d5ec18877e9b2059442606b1..16ee38898803fd0bb0194c9fdf61f80ca570638b 100644 (file)
@@ -179,8 +179,8 @@ fn chain<U>(self, other: U) -> Chain<Self, U::IntoIter> where
 
     /// Creates an iterator that iterates over both this and the specified
     /// iterators simultaneously, yielding the two elements as pairs. When
-    /// either iterator returns None, all further invocations of next() will
-    /// return None.
+    /// either iterator returns `None`, all further invocations of next() will
+    /// return `None`.
     ///
     /// # Examples
     ///
@@ -254,7 +254,7 @@ fn filter<P>(self, predicate: P) -> Filter<Self, P> where
     }
 
     /// Creates an iterator that both filters and maps elements.
-    /// If the specified function returns None, the element is skipped.
+    /// If the specified function returns `None`, the element is skipped.
     /// Otherwise the option is unwrapped and the new value is yielded.
     ///
     /// # Examples
@@ -403,7 +403,7 @@ fn take(self, n: usize) -> Take<Self> where Self: Sized, {
     /// Creates a new iterator that behaves in a similar fashion to fold.
     /// There is a state which is passed between each iteration and can be
     /// mutated as necessary. The yielded values from the closure are yielded
-    /// from the Scan instance when not None.
+    /// from the Scan instance when not `None`.
     ///
     /// # Examples
     ///
@@ -701,7 +701,7 @@ fn position<P>(&mut self, mut predicate: P) -> Option<usize> where
 
     /// Returns the index of the last element satisfying the specified predicate
     ///
-    /// If no element matches, None is returned.
+    /// If no element matches, `None` is returned.
     ///
     /// Does not consume the iterator *before* the first found element.
     ///