diff --git a/src/fn/closures/closure_examples/iter_any.md b/src/fn/closures/closure_examples/iter_any.md index 4b9dce7bfe..ad1f8ff41b 100644 --- a/src/fn/closures/closure_examples/iter_any.md +++ b/src/fn/closures/closure_examples/iter_any.md @@ -33,7 +33,7 @@ fn main() { let array2 = [4, 5, 6]; // `iter()` for arrays yields `&i32`. - println!("2 in array1: {}", array1.iter() .any(|&x| x == 2)); + 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)); }