Ran cargo dev fmt

This commit is contained in:
JarredAllen 2020-03-03 18:06:59 -08:00
parent f8e949fa1c
commit fe342f3291
2 changed files with 6 additions and 10 deletions

View File

@ -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));

View File

@ -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 });
}