about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--clippy_lints/src/int_plus_one.rs6
-rw-r--r--tests/ui/int_plus_one.stderr8
2 files changed, 7 insertions, 7 deletions
diff --git a/clippy_lints/src/int_plus_one.rs b/clippy_lints/src/int_plus_one.rs
index e91fb0c2f27..c629ee05ab9 100644
--- a/clippy_lints/src/int_plus_one.rs
+++ b/clippy_lints/src/int_plus_one.rs
@@ -152,7 +152,7 @@ impl IntPlusOne {
             cx,
             INT_PLUS_ONE,
             block.span,
-            "Unnecessary `>= y + 1` or `x - 1 >=`",
+            "unnecessary `>= y + 1` or `x - 1 >=`",
             "change it to",
             recommendation,
             Applicability::MachineApplicable, // snippet
@@ -163,8 +163,8 @@ impl IntPlusOne {
 impl EarlyLintPass for IntPlusOne {
     fn check_expr(&mut self, cx: &EarlyContext<'_>, item: &Expr) {
         if let ExprKind::Binary(ref kind, ref lhs, ref rhs) = item.kind {
-            if let Some(ref rec) = Self::check_binop(cx, kind.node, lhs, rhs) {
-                Self::emit_warning(cx, item, rec.clone());
+            if let Some(rec) = Self::check_binop(cx, kind.node, lhs, rhs) {
+                Self::emit_warning(cx, item, rec);
             }
         }
     }
diff --git a/tests/ui/int_plus_one.stderr b/tests/ui/int_plus_one.stderr
index 29a6914761c..c5b020ba8ce 100644
--- a/tests/ui/int_plus_one.stderr
+++ b/tests/ui/int_plus_one.stderr
@@ -1,4 +1,4 @@
-error: Unnecessary `>= y + 1` or `x - 1 >=`
+error: unnecessary `>= y + 1` or `x - 1 >=`
   --> $DIR/int_plus_one.rs:9:13
    |
 LL |     let _ = x >= y + 1;
@@ -6,19 +6,19 @@ LL |     let _ = x >= y + 1;
    |
    = note: `-D clippy::int-plus-one` implied by `-D warnings`
 
-error: Unnecessary `>= y + 1` or `x - 1 >=`
+error: unnecessary `>= y + 1` or `x - 1 >=`
   --> $DIR/int_plus_one.rs:10:13
    |
 LL |     let _ = y + 1 <= x;
    |             ^^^^^^^^^^ help: change it to: `y < x`
 
-error: Unnecessary `>= y + 1` or `x - 1 >=`
+error: unnecessary `>= y + 1` or `x - 1 >=`
   --> $DIR/int_plus_one.rs:12:13
    |
 LL |     let _ = x - 1 >= y;
    |             ^^^^^^^^^^ help: change it to: `x > y`
 
-error: Unnecessary `>= y + 1` or `x - 1 >=`
+error: unnecessary `>= y + 1` or `x - 1 >=`
   --> $DIR/int_plus_one.rs:13:13
    |
 LL |     let _ = y <= x - 1;