about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2025-01-18 17:17:41 +0100
committerSamuel Tardieu <sam@rfc1149.net>2025-01-23 00:28:09 +0100
commita03242f8e0e7ac1d15b2e78568dcbb5e92e9f258 (patch)
tree1fdc2f78482102ade096ef22f07edb7b29cda647
parent06221e653ca57a51b94a794cd99c49c8cba68ff9 (diff)
downloadrust-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.rs2
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`"
 }