mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 23:20:39 +00:00
3664d6328d
Create new lint `option_map_or_err_ok` Fixes #10045. For the following code: ```rust let opt = Some(1); opt.map_or(Err("error"), Ok); ``` It suggests to instead write: ```rust let opt = Some(1); opt.ok_or("error"); ``` r? `@flip1995` changelog: Create new lint `option_map_or_err_ok` |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |