]>
Commit | Line | Data |
---|---|---|
f20569fa XL |
1 | error: called `filter_map(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find_map(..)` instead |
2 | --> $DIR/filter_map_next.rs:7:26 | |
3 | | | |
4 | LL | let _: Option<u32> = vec![1, 2, 3, 4, 5, 6] | |
5 | | __________________________^ | |
6 | LL | | .into_iter() | |
7 | LL | | .filter_map(|x| { | |
8 | LL | | if x == 2 { | |
9 | ... | | |
10 | LL | | }) | |
11 | LL | | .next(); | |
12 | | |_______________^ | |
13 | | | |
14 | = note: `-D clippy::filter-map-next` implied by `-D warnings` | |
15 | ||
16 | error: aborting due to previous error | |
17 |