From fe342f32912b3e5a6b48e9e99615319d8c13bd2b Mon Sep 17 00:00:00 2001 From: JarredAllen Date: Tue, 3 Mar 2020 18:06:59 -0800 Subject: [PATCH] Ran cargo dev fmt --- clippy_lints/src/floating_point_arithmetic.rs | 6 +----- tests/ui/floating_point_abs.rs | 10 +++++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/clippy_lints/src/floating_point_arithmetic.rs b/clippy_lints/src/floating_point_arithmetic.rs index 6a58b27f065..0fcfb7b8849 100644 --- a/clippy_lints/src/floating_point_arithmetic.rs +++ b/clippy_lints/src/floating_point_arithmetic.rs @@ -420,11 +420,7 @@ fn is_zero(cx: &LateContext<'_, '_>, expr: &Expr<'_>) -> bool { /// one of the two expressions /// If the two expressions are not negations of each other, then it /// returns None. -fn are_negated<'a>( - cx: &LateContext<'_, '_>, - expr1: &'a Expr<'a>, - expr2: &'a Expr<'a>, -) -> Option<(bool, &'a Expr<'a>)> { +fn are_negated<'a>(cx: &LateContext<'_, '_>, expr1: &'a Expr<'a>, expr2: &'a Expr<'a>) -> Option<(bool, &'a Expr<'a>)> { if let ExprKind::Unary(UnOp::UnNeg, expr1_negated) = &expr1.kind { if are_exprs_equal(cx, expr1_negated, expr2) { return Some((false, expr2)); diff --git a/tests/ui/floating_point_abs.rs b/tests/ui/floating_point_abs.rs index 780eb354715..cbf9c94e41e 100644 --- a/tests/ui/floating_point_abs.rs +++ b/tests/ui/floating_point_abs.rs @@ -112,15 +112,15 @@ fn not_fake_abs5(a: A) -> f64 { fn main() { fake_abs1(5.0); fake_abs2(5.0); - fake_abs3(A { a: 5.0, b: 5.0 } ); + fake_abs3(A { a: 5.0, b: 5.0 }); fake_abs4(5.0); - fake_abs5(A { a: 5.0, b: 5.0 } ); + fake_abs5(A { a: 5.0, b: 5.0 }); fake_nabs1(5.0); fake_nabs2(5.0); - fake_nabs3(A { a: 5.0, b: 5.0 } ); + fake_nabs3(A { a: 5.0, b: 5.0 }); not_fake_abs1(5.0); not_fake_abs2(5.0); not_fake_abs3(5.0, 5.0); - not_fake_abs4(A { a: 5.0, b: 5.0 } ); - not_fake_abs5(A { a: 5.0, b: 5.0 } ); + not_fake_abs4(A { a: 5.0, b: 5.0 }); + not_fake_abs5(A { a: 5.0, b: 5.0 }); }