1 error: `filter(..).map(..)` can be simplified as `filter_map(..)`
2 --> $DIR/manual_filter_map.rs:8:19
4 LL | let _ = (0..).filter(|n| to_opt(*n).is_some()).map(|a| to_opt(a).unwrap());
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `filter_map(|a| to_opt(a))`
7 = note: `-D clippy::manual-filter-map` implied by `-D warnings`
9 error: `filter(..).map(..)` can be simplified as `filter_map(..)`
10 --> $DIR/manual_filter_map.rs:11:19
12 LL | let _ = (0..).filter(|&n| to_opt(n).is_some()).map(|a| to_opt(a).expect("hi"));
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `filter_map(|a| to_opt(a))`
15 error: `filter(..).map(..)` can be simplified as `filter_map(..)`
16 --> $DIR/manual_filter_map.rs:14:19
18 LL | let _ = (0..).filter(|&n| to_res(n).is_ok()).map(|a| to_res(a).unwrap_or(1));
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `filter_map(|a| to_res(a).ok())`
21 error: aborting due to 3 previous errors