From 8a8eedf388a1613c5a084caa4c52ec520672576e Mon Sep 17 00:00:00 2001 From: Jerry Hardee Date: Mon, 15 Jul 2019 14:00:07 -0500 Subject: [PATCH] Lint --- clippy_lints/src/misc.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/clippy_lints/src/misc.rs b/clippy_lints/src/misc.rs index 04c0983db688..d89f886a39b3 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 {