|
1 | 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:18:21 |
| 2 | + --> $DIR/filter_methods.rs:14:21 |
3 | 3 | |
|
4 |
| -18 | let _: Vec<_> = vec![5; 6].into_iter() |
| 4 | +14 | let _: Vec<_> = vec![5; 6].into_iter() |
5 | 5 | | _____________________^
|
6 |
| -19 | | .filter(|&x| x == 0) |
7 |
| -20 | | .map(|x| x * 2) |
| 6 | +15 | | .filter(|&x| x == 0) |
| 7 | +16 | | .map(|x| x * 2) |
8 | 8 | | |_____________________________________________^
|
9 | 9 | |
|
10 | 10 | = note: `-D clippy::filter-map` implied by `-D warnings`
|
11 | 11 |
|
12 | 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:23:21 |
| 13 | + --> $DIR/filter_methods.rs:19:21 |
14 | 14 | |
|
15 |
| -23 | let _: Vec<_> = vec![5_i8; 6].into_iter() |
| 15 | +19 | let _: Vec<_> = vec![5_i8; 6].into_iter() |
16 | 16 | | _____________________^
|
17 |
| -24 | | .filter(|&x| x == 0) |
18 |
| -25 | | .flat_map(|x| x.checked_mul(2)) |
| 17 | +20 | | .filter(|&x| x == 0) |
| 18 | +21 | | .flat_map(|x| x.checked_mul(2)) |
19 | 19 | | |_______________________________________________________________^
|
20 | 20 |
|
21 | 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:28:21 |
| 22 | + --> $DIR/filter_methods.rs:24:21 |
23 | 23 | |
|
24 |
| -28 | let _: Vec<_> = vec![5_i8; 6].into_iter() |
| 24 | +24 | let _: Vec<_> = vec![5_i8; 6].into_iter() |
25 | 25 | | _____________________^
|
26 |
| -29 | | .filter_map(|x| x.checked_mul(2)) |
27 |
| -30 | | .flat_map(|x| x.checked_mul(2)) |
| 26 | +25 | | .filter_map(|x| x.checked_mul(2)) |
| 27 | +26 | | .flat_map(|x| x.checked_mul(2)) |
28 | 28 | | |_______________________________________________________________^
|
29 | 29 |
|
30 | 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:33:21 |
| 31 | + --> $DIR/filter_methods.rs:29:21 |
32 | 32 | |
|
33 |
| -33 | let _: Vec<_> = vec![5_i8; 6].into_iter() |
| 33 | +29 | let _: Vec<_> = vec![5_i8; 6].into_iter() |
34 | 34 | | _____________________^
|
35 |
| -34 | | .filter_map(|x| x.checked_mul(2)) |
36 |
| -35 | | .map(|x| x.checked_mul(2)) |
| 35 | +30 | | .filter_map(|x| x.checked_mul(2)) |
| 36 | +31 | | .map(|x| x.checked_mul(2)) |
37 | 37 | | |__________________________________________________________^
|
38 | 38 |
|
39 | 39 | error: aborting due to 4 previous errors
|
|
0 commit comments