提交 f85f971e 编写于 作者: M Manish Goregaokar

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

上级 394269d1
......@@ -548,7 +548,9 @@ fn any(&mut self, f: |A| -> bool) -> bool {
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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册