diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2014-11-20 23:35:46 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2014-11-21 01:15:56 +0530 |
| commit | f85f971e4482a5f38d8b702ae9a93065e18446ef (patch) | |
| tree | e092e0a221affb240e44b1eaccb28da600e3f954 /src | |
| parent | 394269d16e3752a23ffa273e68f8aaefd2a510c4 (diff) | |
| download | rust-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.rs | 4 |
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 { |
