Skip to content

Commit 2d138fb

Browse files
committed
add local use BinOpKind::*;
1 parent c86874f commit 2d138fb

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

clippy_lints/src/utils/ast_utils.rs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,10 @@ pub mod ident_iter;
1414
pub use ident_iter::IdentIter;
1515

1616
pub fn is_useless_with_eq_exprs(kind: BinOpKind) -> bool {
17+
use BinOpKind::*;
1718
matches!(
1819
kind,
19-
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
20+
Sub | Div | Eq | Lt | Le | Gt | Ge | Ne | And | Or | BitXor | BitAnd | BitOr
3221
)
3322
}
3423

0 commit comments

Comments
 (0)