mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 14:38:46 +00:00
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` |
||
---|---|---|
.. | ||
test_utils | ||
ui | ||
ui-cargo | ||
ui-internal | ||
ui-toml | ||
workspace_test | ||
check-fmt.rs | ||
clippy.toml | ||
compile-test.rs | ||
dogfood.rs | ||
headers.rs | ||
integration.rs | ||
lint_message_convention.rs | ||
missing-test-files.rs | ||
versioncheck.rs | ||
workspace.rs |