We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0b9a1e8 + 08f9656 commit 5bdddccCopy full SHA for 5bdddcc
src/fn/closures/closure_examples/iter_find.md
@@ -39,9 +39,9 @@ fn main() {
39
let array1 = [1, 2, 3];
40
let array2 = [4, 5, 6];
41
42
- // `iter()` for arrays yields `&i32`
+ // `iter()` for arrays yields `&&i32`
43
println!("Find 2 in array1: {:?}", array1.iter() .find(|&&x| x == 2));
44
- // `into_iter()` for arrays yields `i32`
+ // `into_iter()` for arrays yields `&i32`
45
println!("Find 2 in array2: {:?}", array2.into_iter().find(|&x| x == 2));
46
}
47
```
0 commit comments