1 error: called `filter(p).map(q)` on an `Iterator`. This is more succinctly expressed by calling `.filter_map(..)` instead.
2 --> $DIR/filter_methods.rs:8:21
4 8 | let _: Vec<_> = vec![5; 6].into_iter()
5 | _____________________^
6 9 | | .filter(|&x| x == 0)
8 | |_____________________________________________^
10 = note: `-D clippy::filter-map` implied by `-D warnings`
12 error: called `filter(p).flat_map(q)` on an `Iterator`. This is more succinctly expressed by calling `.flat_map(..)` and filtering by returning an empty Iterator.
13 --> $DIR/filter_methods.rs:13:21
15 13 | let _: Vec<_> = vec![5_i8; 6].into_iter()
16 | _____________________^
17 14 | | .filter(|&x| x == 0)
18 15 | | .flat_map(|x| x.checked_mul(2))
19 | |_______________________________________________________________^
21 error: called `filter_map(p).flat_map(q)` on an `Iterator`. This is more succinctly expressed by calling `.flat_map(..)` and filtering by returning an empty Iterator.
22 --> $DIR/filter_methods.rs:18:21
24 18 | let _: Vec<_> = vec![5_i8; 6].into_iter()
25 | _____________________^
26 19 | | .filter_map(|x| x.checked_mul(2))
27 20 | | .flat_map(|x| x.checked_mul(2))
28 | |_______________________________________________________________^
30 error: called `filter_map(p).map(q)` on an `Iterator`. This is more succinctly expressed by only calling `.filter_map(..)` instead.
31 --> $DIR/filter_methods.rs:23:21
33 23 | let _: Vec<_> = vec![5_i8; 6].into_iter()
34 | _____________________^
35 24 | | .filter_map(|x| x.checked_mul(2))
36 25 | | .map(|x| x.checked_mul(2))
37 | |__________________________________________________________^
39 error: aborting due to 4 previous errors