We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a0c9eb commit a2badd5Copy full SHA for a2badd5
rust-by-example/src/fn/closures/closure_examples/iter_any.md
@@ -13,8 +13,9 @@ pub trait Iterator {
13
// and modified, but not consumed.
14
fn any<F>(&mut self, f: F) -> bool where
15
// `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.
+ // modified, not consumed. `Self::Item` is the closure parameter type,
+ // which is determined by the iterator (e.g., `&T` for `.iter()`,
18
+ // `T` for `.into_iter()`).
19
F: FnMut(Self::Item) -> bool;
20
}
21
```
0 commit comments