Skip to content

Commit 5bdddcc

Browse files
authored
Merge pull request #1714 from lebedev/patch-2
Correct commentary about arrays in iter_find.md
2 parents 0b9a1e8 + 08f9656 commit 5bdddcc

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)