summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/result_map_or_into_option.stderr
blob: 3d6bfef48ecab972305c15efbb81c47c27a2d83e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
error: called `map_or(None, Some)` on a `Result` value
  --> $DIR/result_map_or_into_option.rs:5:13
   |
LL |     let _ = opt.map_or(None, Some);
   |             ^^^^^^^^^^^^^^^^^^^^^^ help: try using `ok` instead: `opt.ok()`
   |
   = note: `-D clippy::result-map-or-into-option` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::result_map_or_into_option)]`

error: called `map_or_else(|_| None, Some)` on a `Result` value
  --> $DIR/result_map_or_into_option.rs:7:13
   |
LL |     let _ = opt.map_or_else(|_| None, Some);
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try using `ok` instead: `opt.ok()`

error: called `map_or_else(|_| None, Some)` on a `Result` value
  --> $DIR/result_map_or_into_option.rs:10:13
   |
LL |     let _ = opt.map_or_else(|_| { None }, Some);
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try using `ok` instead: `opt.ok()`

error: aborting due to 3 previous errors