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.
use BinOpKind::*;
1 parent c86874f commit 2d138fbCopy full SHA for 2d138fb
clippy_lints/src/utils/ast_utils.rs
@@ -14,21 +14,10 @@ pub mod ident_iter;
14
pub use ident_iter::IdentIter;
15
16
pub fn is_useless_with_eq_exprs(kind: BinOpKind) -> bool {
17
+ use BinOpKind::*;
18
matches!(
19
kind,
- BinOpKind::Sub
20
- | BinOpKind::Div
21
- | BinOpKind::Eq
22
- | BinOpKind::Lt
23
- | BinOpKind::Le
24
- | BinOpKind::Gt
25
- | BinOpKind::Ge
26
- | BinOpKind::Ne
27
- | BinOpKind::And
28
- | BinOpKind::Or
29
- | BinOpKind::BitXor
30
- | BinOpKind::BitAnd
31
- | BinOpKind::BitOr
+ Sub | Div | Eq | Lt | Le | Gt | Ge | Ne | And | Or | BitXor | BitAnd | BitOr
32
)
33
}
34
0 commit comments