diff --git a/src/fn/closures/closure_examples/iter_any.md b/src/fn/closures/closure_examples/iter_any.md index 4b9dce7bfe..9fd35fbce1 100644 --- a/src/fn/closures/closure_examples/iter_any.md +++ b/src/fn/closures/closure_examples/iter_any.md @@ -35,7 +35,7 @@ fn main() { // `iter()` for arrays yields `&i32`. println!("2 in array1: {}", array1.iter() .any(|&x| x == 2)); // `into_iter()` for arrays yields `i32`. - println!("2 in array2: {}", array2.iter().any(|&x| x == 2)); + println!("2 in array2: {}", array2.into_iter().any(|x| x == 2)); } ```