1
Fork 0

auto merge of #19150 : Manishearth/rust/find-doc, r=Gankro

It's useful to know this (opens up a bunch of other opportunities especially whilst parsing)
This commit is contained in:
bors 2014-11-23 15:46:56 +00:00
commit 220b99b148

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 {