2023-12-01 11:21:58 -06:00
|
|
|
error: called `map_or(Err(_), Ok)` on an `Option` value
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/option_map_or_err_ok.rs:5:13
|
2023-12-01 11:21:58 -06:00
|
|
|
|
|
|
|
|
LL | let _ = x.map_or(Err("a"), Ok);
|
2024-01-25 12:17:36 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `ok_or`: `x.ok_or("a")`
|
2023-12-01 11:21:58 -06:00
|
|
|
|
|
|
|
|
= note: `-D clippy::option-map-or-err-ok` implied by `-D warnings`
|
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::option_map_or_err_ok)]`
|
|
|
|
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
|