Skip to content

Commit 8a8eedf

Browse files
author
Jerry Hardee
committed
Lint
1 parent 8adbf7f commit 8a8eedf

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

clippy_lints/src/misc.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -511,13 +511,11 @@ fn is_signum(cx: &LateContext<'_, '_>, expr: &Expr) -> bool {
511511
if sym!(signum) == method_name.ident.name;
512512
// Check that the receiver of the signum() is a float (expressions[0] is the receiver of
513513
// the method call)
514-
if is_float(cx, &expressions[0]);
515514
then {
516-
true
517-
} else {
518-
false
515+
return is_float(cx, &expressions[0]);
519516
}
520517
}
518+
false
521519
}
522520

523521
fn is_float(cx: &LateContext<'_, '_>, expr: &Expr) -> bool {

0 commit comments

Comments
 (0)