We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b72cb48 commit f04eb59Copy full SHA for f04eb59
clippy_lints/src/operators/modulo_arithmetic.rs
@@ -41,7 +41,7 @@ fn used_in_comparison_with_zero(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool {
41
return false;
42
};
43
44
- if op.node == BinOpKind::Eq || op.node == BinOpKind::Ne {
+ if let BinOpKind::Eq | BinOpKind::Ne = op.node {
45
let ecx = ConstEvalCtxt::new(cx);
46
matches!(ecx.eval(lhs), Some(Constant::Int(0))) || matches!(ecx.eval(rhs), Some(Constant::Int(0)))
47
} else {
0 commit comments