1 error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type `()`
2 --> $DIR/result_map_unit_fn_unfixable.rs:23:5
4 LL | x.field.map(|value| { do_nothing(value); do_nothing(value) });
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
7 | help: try this: `if let Ok(value) = x.field { ... }`
9 = note: `-D clippy::result-map-unit-fn` implied by `-D warnings`
11 error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type `()`
12 --> $DIR/result_map_unit_fn_unfixable.rs:25:5
14 LL | x.field.map(|value| if value > 0 { do_nothing(value); do_nothing(value) });
15 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
17 | help: try this: `if let Ok(value) = x.field { ... }`
19 error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type `()`
20 --> $DIR/result_map_unit_fn_unfixable.rs:29:5
22 LL | x.field.map(|value| {
26 LL | || do_nothing(value);
27 LL | || do_nothing(value)
29 | ||______^- help: try this: `if let Ok(value) = x.field { ... }`
33 error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type `()`
34 --> $DIR/result_map_unit_fn_unfixable.rs:33:5
36 LL | x.field.map(|value| { do_nothing(value); do_nothing(value); });
37 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
39 | help: try this: `if let Ok(value) = x.field { ... }`
41 error: called `map(f)` on an `Result` value where `f` is a function that returns the unit type `()`
42 --> $DIR/result_map_unit_fn_unfixable.rs:37:5
44 LL | "12".parse::<i32>().map(diverge);
45 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
47 | help: try this: `if let Ok(a) = "12".parse::<i32>() { diverge(a) }`
49 error: called `map(f)` on an `Result` value where `f` is a function that returns the unit type `()`
50 --> $DIR/result_map_unit_fn_unfixable.rs:43:5
52 LL | y.map(do_nothing);
55 | help: try this: `if let Ok(_y) = y { do_nothing(_y) }`
57 error: aborting due to 6 previous errors