Skip to content

Commit a2badd5

Browse files
committed
update original
1 parent 7a0c9eb commit a2badd5

File tree

1 file changed

+3
-2
lines changed
  • rust-by-example/src/fn/closures/closure_examples

1 file changed

+3
-2
lines changed

rust-by-example/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)