Skip to content

Commit

Permalink
add local use BinOpKind::*;
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan1729 committed Nov 1, 2020
1 parent ebc8d44 commit 2e05439
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions clippy_lints/src/utils/ast_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,10 @@ pub mod ident_iter;
pub use ident_iter::IdentIter;

pub fn is_useless_with_eq_exprs(kind: BinOpKind) -> bool {
use BinOpKind::*;
matches!(
kind,
BinOpKind::Sub
| BinOpKind::Div
| BinOpKind::Eq
| BinOpKind::Lt
| BinOpKind::Le
| BinOpKind::Gt
| BinOpKind::Ge
| BinOpKind::Ne
| BinOpKind::And
| BinOpKind::Or
| BinOpKind::BitXor
| BinOpKind::BitAnd
| BinOpKind::BitOr
Sub | Div | Eq | Lt | Le | Gt | Ge | Ne | And | Or | BitXor | BitAnd | BitOr
)
}

Expand Down

0 comments on commit 2e05439

Please sign in to comment.