1 error: this `.filter_map` can be written more simply using `.filter`
2 --> $DIR/unnecessary_filter_map.rs:12:13
4 12 | let _ = (0..4).filter_map(|x| if x > 1 { Some(x) } else { None });
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 = note: `-D clippy::unnecessary-filter-map` implied by `-D warnings`
9 error: this `.filter_map` can be written more simply using `.filter`
10 --> $DIR/unnecessary_filter_map.rs:13:13
12 13 | let _ = (0..4).filter_map(|x| { if x > 1 { return Some(x); }; None });
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15 error: this `.filter_map` can be written more simply using `.filter`
16 --> $DIR/unnecessary_filter_map.rs:14:13
18 14 | let _ = (0..4).filter_map(|x| match x {
25 error: this `.filter_map` can be written more simply using `.map`
26 --> $DIR/unnecessary_filter_map.rs:19:13
28 19 | let _ = (0..4).filter_map(|x| Some(x + 1));
29 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31 error: aborting due to 4 previous errors