about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2014-11-20 23:35:46 +0530
committerManish Goregaokar <manishsmail@gmail.com>2014-11-21 01:15:56 +0530
commitf85f971e4482a5f38d8b702ae9a93065e18446ef (patch)
treee092e0a221affb240e44b1eaccb28da600e3f954 /src
parent394269d16e3752a23ffa273e68f8aaefd2a510c4 (diff)
downloadrust-f85f971e4482a5f38d8b702ae9a93065e18446ef.tar.gz
rust-f85f971e4482a5f38d8b702ae9a93065e18446ef.zip
Mention that find() doesn't consume the full iterator
Diffstat (limited to 'src')
-rw-r--r--src/libcore/iter.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs
index 3b62c8da1eb..02242492e34 100644
--- a/src/libcore/iter.rs
+++ b/src/libcore/iter.rs
@@ -548,7 +548,9 @@ pub trait Iterator<A> {
         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 {