Skip to content

Commit 220b99b

Browse files
committed
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)
2 parents e197a2b + f85f971 commit 220b99b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/libcore/iter.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,9 @@ pub trait Iterator<A> {
548548
false
549549
}
550550

551-
/// Return the first element satisfying the specified predicate
551+
/// Returns the first element satisfying the specified predicate.
552+
///
553+
/// Does not consume the iterator past the first found element.
552554
#[inline]
553555
fn find(&mut self, predicate: |&A| -> bool) -> Option<A> {
554556
for x in *self {

0 commit comments

Comments
 (0)