mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-24 12:03:28 +00:00
11 lines
430 B
Text
11 lines
430 B
Text
error: called `map_or(Err(_), Ok)` on an `Option` value
|
|
--> tests/ui/option_map_or_err_ok.rs:5:13
|
|
|
|
|
LL | let _ = x.map_or(Err("a"), Ok);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `ok_or`: `x.ok_or("a")`
|
|
|
|
|
= 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
|
|
|