Skip to content

Commit 8f5b5e1

Browse files
authored
Update iter_any.md (#151)
1 parent 0f3b503 commit 8f5b5e1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/fn/closures/closure_examples/iter_any.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ fn main() {
3232
let array2 = [4, 5, 6];
3333
3434
// 对数组的 `iter()` 举出 `&i32`。
35-
println!("2 in array1: {}", array1.iter().any(|&x| x == 2));
36-
// 对数组的 `into_iter()` 通常举出 `&i32`。
37-
println!("2 in array2: {}", array2.iter().any(|&x| x == 2));
35+
println!("2 in array1: {}", array1.iter() .any(|&x| x == 2));
36+
// 对数组的 `into_iter()` 举出 `i32`。
37+
println!("2 in array2: {}", array2.into_iter().any(|x| x == 2));
3838
}
3939
```
4040

0 commit comments

Comments
 (0)