diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2025-01-18 17:17:41 +0100 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2025-01-23 00:28:09 +0100 |
| commit | a03242f8e0e7ac1d15b2e78568dcbb5e92e9f258 (patch) | |
| tree | 1fdc2f78482102ade096ef22f07edb7b29cda647 | |
| parent | 06221e653ca57a51b94a794cd99c49c8cba68ff9 (diff) | |
| download | rust-a03242f8e0e7ac1d15b2e78568dcbb5e92e9f258.tar.gz rust-a03242f8e0e7ac1d15b2e78568dcbb5e92e9f258.zip | |
Move `manual_ok_or` from pedantic to style
`manual_ok_or` covers the same case that were covered by `option_map_or_err_ok` which is not deprecated. The latter was in the "style" category. Also, the lint is machine applicable, and leads to shorter and more readable code, so "style" is appropriate. The only difference is that the η-expanded form of `Result::Ok()` was not covered by `option_map_or_err_ok` while it is by `manual_ok_or`, so the category change may expose some new occurrences.
| -rw-r--r-- | clippy_lints/src/methods/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs index 5dad6c2e5df..7625057368e 100644 --- a/clippy_lints/src/methods/mod.rs +++ b/clippy_lints/src/methods/mod.rs @@ -2639,7 +2639,7 @@ declare_clippy_lint! { /// ``` #[clippy::version = "1.49.0"] pub MANUAL_OK_OR, - pedantic, + style, "finds patterns that can be encoded more concisely with `Option::ok_or`" } |
