]> git.lizzy.rs Git - rust.git/commitdiff
Mention that find() doesn't consume the full iterator
authorManish Goregaokar <manishsmail@gmail.com>
Thu, 20 Nov 2014 18:05:46 +0000 (23:35 +0530)
committerManish Goregaokar <manishsmail@gmail.com>
Thu, 20 Nov 2014 19:45:56 +0000 (01:15 +0530)
src/libcore/iter.rs

index 3b62c8da1ebe111cc0cac40c128737de08fe2804..02242492e34a188f032041a024437b3224f0e8f8 100644 (file)
@@ -548,7 +548,9 @@ fn any(&mut self, f: |A| -> bool) -> bool {
         false
     }
 
-    /// Return the first element satisfying the specified predicate
+    /// Returns the first element satisfying the specified predicate.
+    ///
+    /// Does not consume the iterator past the first found element.
     #[inline]
     fn find(&mut self, predicate: |&A| -> bool) -> Option<A> {
         for x in *self {