Skip to content

Commit a03242f

Browse files
committed
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.
1 parent 06221e6 commit a03242f

File tree

1 file changed

+1
-1
lines changed
  • clippy_lints/src/methods

1 file changed

+1
-1
lines changed

clippy_lints/src/methods/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2639,7 +2639,7 @@ declare_clippy_lint! {
26392639
/// ```
26402640
#[clippy::version = "1.49.0"]
26412641
pub MANUAL_OK_OR,
2642-
pedantic,
2642+
style,
26432643
"finds patterns that can be encoded more concisely with `Option::ok_or`"
26442644
}
26452645

0 commit comments

Comments
 (0)