Skip to content

Commit

Permalink
Passed through cargo fmt.
Browse files Browse the repository at this point in the history
  • Loading branch information
Helios-vmg committed Jun 12, 2024
1 parent 7563f24 commit 3e71a76
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions detectors/incorrect-exponentiation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,13 @@ impl<'tcx> LateLintPass<'tcx> for IncorrectExponentiation {

impl<'tcx> Visitor<'tcx> for IncorrectExponentiationStorage {
fn visit_expr(&mut self, expr: &'tcx Expr<'_>) {

if let ExprKind::AssignOp(binop, _, _) = &expr.kind {
if binop.node == rustc_hir::BinOpKind::BitXor{
if let ExprKind::AssignOp(binop, _, _) = &expr.kind {
if binop.node == rustc_hir::BinOpKind::BitXor {
self.incorrect_exponentiation = true;
self.span.push(expr.span);
}
}

if let ExprKind::Binary(op, _, _) = &expr.kind {
if op.node == rustc_hir::BinOpKind::BitXor {
self.incorrect_exponentiation = true;
Expand Down

0 comments on commit 3e71a76

Please sign in to comment.