Skip to content

Commit

Permalink
Change if_same_then_else to be a style lint
Browse files Browse the repository at this point in the history
CC rust-lang#3770

From rust-lang#3770 (comment) (@flip1995):

> Oh I thought I replied to this: I definitely see now that having this
> as a correctness lint might be the wrong categorization. What we might
> want to do is to just allow this lint, if there are comments in the
> arm bodies. But a good first step would be to downgrade this lint to
> style or complexity. I would vote for style since merging two arms is
> not always less complex.
  • Loading branch information
hrxi committed Nov 14, 2023
1 parent 0c42e45 commit 17893f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_lints/src/copies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ declare_clippy_lint! {
/// ```
#[clippy::version = "pre 1.29.0"]
pub IF_SAME_THEN_ELSE,
correctness,
style,
"`if` with the same `then` and `else` blocks"
}

Expand Down

0 comments on commit 17893f4

Please sign in to comment.