Skip to content

Commit 08f9656

Browse files
authored
Correct commentary about arrays in iter_find.md
1 parent 2d56dd9 commit 08f9656

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/fn/closures/closure_examples/iter_find.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ fn main() {
3939
let array1 = [1, 2, 3];
4040
let array2 = [4, 5, 6];
4141
42-
// `iter()` for arrays yields `&i32`
42+
// `iter()` for arrays yields `&&i32`
4343
println!("Find 2 in array1: {:?}", array1.iter() .find(|&&x| x == 2));
44-
// `into_iter()` for arrays yields `i32`
44+
// `into_iter()` for arrays yields `&i32`
4545
println!("Find 2 in array2: {:?}", array2.into_iter().find(|&x| x == 2));
4646
}
4747
```

0 commit comments

Comments
 (0)