2023-11-24 16:57:13 +00:00
|
|
|
error: called `map_or(Err(_), Ok)` on an `Option` value
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/option_map_or_err_ok.rs:5:13
|
2023-11-24 16:57:13 +00:00
|
|
|
|
|
|
|
|
LL | let _ = x.map_or(Err("a"), Ok);
|
2024-01-18 17:17:53 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `ok_or`: `x.ok_or("a")`
|
2023-11-24 16:57:13 +00: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)]`
|
|
|
|
|
2023-12-01 17:06:03 +00:00
|
|
|
error: aborting due to 1 previous error
|
2023-11-24 16:57:13 +00:00
|
|
|
|