Skip to content

Commit 87d6244

Browse files
authored
Merge pull request #1476 from adsick/master
fix into_iter for arrays
2 parents dfcc22e + e5965a4 commit 87d6244

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

book.toml

+3
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ editor = "ace"
99

1010
[output.html.fold]
1111
enable = true
12+
13+
[output.html]
14+
git-repository-url = "https://github.com/rust-lang/rust-by-example"

src/fn/closures/closure_examples/iter_find.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ fn main() {
4141
4242
// `iter()` for arrays yields `&i32`
4343
println!("Find 2 in array1: {:?}", array1.iter() .find(|&&x| x == 2));
44-
// `into_iter()` for arrays unusually yields `&i32`
45-
println!("Find 2 in array2: {:?}", array2.into_iter().find(|&&x| x == 2));
44+
// `into_iter()` for arrays yields `i32`
45+
println!("Find 2 in array2: {:?}", array2.into_iter().find(|&x| x == 2));
4646
}
4747
```
4848

0 commit comments

Comments
 (0)