Skip to content

Commit 7c82b89

Browse files
authored
Update documentation for any function in iter_any.md
Clarify the description of the `any` function parameters.
1 parent f944161 commit 7c82b89

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)