1 error: called `filter(p).map(q)` on an `Iterator`
2 --> $DIR/filter_methods.rs:5: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`
8 = help: this is more succinctly expressed by calling `.filter_map(..)` instead
10 error: called `filter(p).flat_map(q)` on an `Iterator`
11 --> $DIR/filter_methods.rs:7:21
13 LL | let _: Vec<_> = vec![5_i8; 6]
14 | _____________________^
16 LL | | .filter(|&x| x == 0)
17 LL | | .flat_map(|x| x.checked_mul(2))
18 | |_______________________________________^
20 = help: this is more succinctly expressed by calling `.flat_map(..)` and filtering by returning `iter::empty()`
22 error: called `filter_map(p).flat_map(q)` on an `Iterator`
23 --> $DIR/filter_methods.rs:13:21
25 LL | let _: Vec<_> = vec![5_i8; 6]
26 | _____________________^
28 LL | | .filter_map(|x| x.checked_mul(2))
29 LL | | .flat_map(|x| x.checked_mul(2))
30 | |_______________________________________^
32 = help: this is more succinctly expressed by calling `.flat_map(..)` and filtering by returning `iter::empty()`
34 error: called `filter_map(p).map(q)` on an `Iterator`
35 --> $DIR/filter_methods.rs:19:21
37 LL | let _: Vec<_> = vec![5_i8; 6]
38 | _____________________^
40 LL | | .filter_map(|x| x.checked_mul(2))
41 LL | | .map(|x| x.checked_mul(2))
42 | |__________________________________^
44 = help: this is more succinctly expressed by only calling `.filter_map(..)` instead
46 error: aborting due to 4 previous errors