Skip to content

Commit 9bfb8e3

Browse files
authored
Merge pull request #1973 from Mctursh/docs-clarify-SelfItem-behavior-in-Iteratorany-trait-example
Update documentation for `any` function in iter_any.md
2 parents f944161 + 7c82b89 commit 9bfb8e3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/fn/closures/closure_examples/iter_any.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ pub trait Iterator {
1313
// and modified, but not consumed.
1414
fn any<F>(&mut self, f: F) -> bool where
1515
// `FnMut` meaning any captured variable may at most be
16-
// modified, not consumed. `Self::Item` states it takes
17-
// arguments to the closure by value.
16+
// modified, not consumed. `Self::Item` is the closure parameter type,
17+
// which is determined by the iterator (e.g., `&T` for `.iter()`,
18+
// `T` for `.into_iter()`).
1819
F: FnMut(Self::Item) -> bool;
1920
}
2021
```

0 commit comments

Comments
 (0)