about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--clippy_lints/src/misc.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/clippy_lints/src/misc.rs b/clippy_lints/src/misc.rs
index 04c0983db68..d89f886a39b 100644
--- a/clippy_lints/src/misc.rs
+++ b/clippy_lints/src/misc.rs
@@ -511,13 +511,11 @@ fn is_signum(cx: &LateContext<'_, '_>, expr: &Expr) -> bool {
         if sym!(signum) == method_name.ident.name;
         // Check that the receiver of the signum() is a float (expressions[0] is the receiver of
         // the method call)
-        if is_float(cx, &expressions[0]);
         then {
-            true
-        } else {
-            false
+            return is_float(cx, &expressions[0]);
         }
     }
+    false
 }
 
 fn is_float(cx: &LateContext<'_, '_>, expr: &Expr) -> bool {