1 error: this `.find_map` can be written more simply using `.find`
2 --> $DIR/unnecessary_find_map.rs:4:13
4 LL | let _ = (0..4).find_map(|x| if x > 1 { Some(x) } else { None });
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 = note: `-D clippy::unnecessary-find-map` implied by `-D warnings`
9 error: this `.find_map` can be written more simply using `.find`
10 --> $DIR/unnecessary_find_map.rs:5:13
12 LL | let _ = (0..4).find_map(|x| {
15 LL | | return Some(x);
21 error: this `.find_map` can be written more simply using `.find`
22 --> $DIR/unnecessary_find_map.rs:11:13
24 LL | let _ = (0..4).find_map(|x| match x {
31 error: this `.find_map` can be written more simply using `.map(..).next()`
32 --> $DIR/unnecessary_find_map.rs:16:13
34 LL | let _ = (0..4).find_map(|x| Some(x + 1));
35 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
37 error: aborting due to 4 previous errors