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:14:21
4 LL | let _: Vec<_> = vec![5; 6].into_iter().filter(|&x| x == 0).map(|x| x * 2).collect();
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 = note: `-D clippy::filter-map` implied by `-D warnings`
9 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.
10 --> $DIR/filter_methods.rs:16:21
12 LL | let _: Vec<_> = vec![5_i8; 6]
13 | _____________________^
15 LL | | .filter(|&x| x == 0)
16 LL | | .flat_map(|x| x.checked_mul(2))
17 | |_______________________________________^
19 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.
20 --> $DIR/filter_methods.rs:22:21
22 LL | let _: Vec<_> = vec![5_i8; 6]
23 | _____________________^
25 LL | | .filter_map(|x| x.checked_mul(2))
26 LL | | .flat_map(|x| x.checked_mul(2))
27 | |_______________________________________^
29 error: called `filter_map(p).map(q)` on an `Iterator`. This is more succinctly expressed by only calling `.filter_map(..)` instead.
30 --> $DIR/filter_methods.rs:28:21
32 LL | let _: Vec<_> = vec![5_i8; 6]
33 | _____________________^
35 LL | | .filter_map(|x| x.checked_mul(2))
36 LL | | .map(|x| x.checked_mul(2))
37 | |__________________________________^
39 error: aborting due to 4 previous errors