From f85f971e4482a5f38d8b702ae9a93065e18446ef Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Thu, 20 Nov 2014 23:35:46 +0530 Subject: Mention that find() doesn't consume the full iterator --- src/libcore/iter.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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 { 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 { for x in *self { -- cgit 1.4.1-3-g733a5