about summary refs log tree commit diff
diff options
context:
space:
mode:
authorKonrad Borowski <konrad@borowski.pw>2018-12-29 17:25:45 +0100
committerKonrad Borowski <konrad@borowski.pw>2018-12-29 17:25:45 +0100
commit79cd95cf35a09489da02f7948886c6a736503606 (patch)
tree1a7aac66a5c513974b9d02433c7b638b1c43d66a
parent0ddb6284887facf7e0c0f6908c69e6ba52426dd0 (diff)
downloadrust-79cd95cf35a09489da02f7948886c6a736503606.tar.gz
rust-79cd95cf35a09489da02f7948886c6a736503606.zip
Use match ergonomics for artithmetic lint
-rw-r--r--clippy_lints/src/arithmetic.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/clippy_lints/src/arithmetic.rs b/clippy_lints/src/arithmetic.rs
index 0b2c00b9b58..a9b61d328e4 100644
--- a/clippy_lints/src/arithmetic.rs
+++ b/clippy_lints/src/arithmetic.rs
@@ -73,8 +73,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Arithmetic {
                 return;
             }
         }
-        match expr.node {
-            hir::ExprKind::Binary(ref op, ref l, ref r) => {
+        match &expr.node {
+            hir::ExprKind::Binary(op, l, r) => {
                 match op.node {
                     hir::BinOpKind::And
                     | hir::BinOpKind::Or
@@ -100,7 +100,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Arithmetic {
                     self.expr_span = Some(expr.span);
                 }
             },
-            hir::ExprKind::Unary(hir::UnOp::UnNeg, ref arg) => {
+            hir::ExprKind::Unary(hir::UnOp::UnNeg, arg) => {
                 let ty = cx.tables.expr_ty(arg);
                 if ty.is_integral() {
                     span_lint(cx, INTEGER_ARITHMETIC, expr.span, "integer arithmetic detected");