]> git.lizzy.rs Git - rust.git/blob - clippy_tests/examples/filter_methods.stderr
Fix the test suite after cargo update
[rust.git] / clippy_tests / examples / filter_methods.stderr
1 error: called `filter(p).map(q)` on an `Iterator`. This is more succinctly expressed by calling `.filter_map(..)` instead.
2   --> filter_methods.rs:8:21
3    |
4 8  |       let _: Vec<_> = vec![5; 6].into_iter()
5    |  _____________________^
6 9  | |                               .filter(|&x| x == 0)
7 10 | |                               .map(|x| x * 2)
8    | |_____________________________________________^
9    |
10    = note: `-D filter-map` implied by `-D warnings`
11
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   --> filter_methods.rs:13:21
14    |
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    | |_______________________________________________________________^
20    |
21    = note: `-D filter-map` implied by `-D warnings`
22
23 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.
24   --> filter_methods.rs:18:21
25    |
26 18 |       let _: Vec<_> = vec![5_i8; 6].into_iter()
27    |  _____________________^
28 19 | |                                 .filter_map(|x| x.checked_mul(2))
29 20 | |                                 .flat_map(|x| x.checked_mul(2))
30    | |_______________________________________________________________^
31    |
32    = note: `-D filter-map` implied by `-D warnings`
33
34 error: called `filter_map(p).map(q)` on an `Iterator`. This is more succinctly expressed by only calling `.filter_map(..)` instead.
35   --> filter_methods.rs:23:21
36    |
37 23 |       let _: Vec<_> = vec![5_i8; 6].into_iter()
38    |  _____________________^
39 24 | |                                 .filter_map(|x| x.checked_mul(2))
40 25 | |                                 .map(|x| x.checked_mul(2))
41    | |__________________________________________________________^
42    |
43    = note: `-D filter-map` implied by `-D warnings`
44
45 error: aborting due to previous error(s)
46
47
48 To learn more, run the command again with --verbose.