1 error: called `map_or(None, ..)` on an `Option` value. This can be done more directly by calling `map(..)` instead
2 --> $DIR/option_map_or_none.rs:12:26
4 LL | let _: Option<i32> = opt.map_or(None, |x| Some(x + 1));
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try using `map` instead: `opt.map(|x| x + 1)`
7 = note: `-D clippy::option-map-or-none` implied by `-D warnings`
9 error: called `map_or(None, ..)` on an `Option` value. This can be done more directly by calling `map(..)` instead
10 --> $DIR/option_map_or_none.rs:15:26
12 LL | let _: Option<i32> = opt.map_or(None, |x| {
13 | __________________________^
16 | |_________________________^ help: try using `map` instead: `opt.map(|x| x + 1)`
18 error: called `map_or(None, ..)` on an `Option` value. This can be done more directly by calling `and_then(..)` instead
19 --> $DIR/option_map_or_none.rs:19:26
21 LL | let _: Option<i32> = opt.map_or(None, bar);
22 | ^^^^^^^^^^^^^^^^^^^^^ help: try using `and_then` instead: `opt.and_then(bar)`
24 error: called `map_or(None, ..)` on an `Option` value. This can be done more directly by calling `and_then(..)` instead
25 --> $DIR/option_map_or_none.rs:20:26
27 LL | let _: Option<i32> = opt.map_or(None, |x| {
28 | __________________________^
29 LL | | let offset = 0;
30 LL | | let height = x;
31 LL | | Some(offset + height)
35 help: try using `and_then` instead
37 LL ~ let _: Option<i32> = opt.and_then(|x| {
40 LL + Some(offset + height)
44 error: called `map_or(None, Some)` on a `Result` value. This can be done more directly by calling `ok()` instead
45 --> $DIR/option_map_or_none.rs:27:26
47 LL | let _: Option<i32> = r.map_or(None, Some);
48 | ^^^^^^^^^^^^^^^^^^^^ help: try using `ok` instead: `r.ok()`
50 = note: `-D clippy::result-map-or-into-option` implied by `-D warnings`
52 error: aborting due to 5 previous errors