Mention that find() doesn't consume the full iterator

This commit is contained in:
Manish Goregaokar 2014-11-20 23:35:46 +05:30
parent 394269d16e
commit f85f971e44

View file

@ -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 {