From c20e17f8ee44e05067402960dc12794c377fbe03 Mon Sep 17 00:00:00 2001 From: Michael Wright Date: Tue, 6 Nov 2018 07:05:13 +0200 Subject: [PATCH] Remove `+` from `has_unary_equivalent` Rust doesn't has a unary + operator! --- clippy_lints/src/formatting.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/clippy_lints/src/formatting.rs b/clippy_lints/src/formatting.rs index 69aabcb7949a..d06183cb52f1 100644 --- a/clippy_lints/src/formatting.rs +++ b/clippy_lints/src/formatting.rs @@ -174,9 +174,8 @@ fn check_else_if(cx: &EarlyContext<'_>, expr: &ast::Expr) { } fn has_unary_equivalent(bin_op: ast::BinOpKind) -> bool { - //+, &, *, - - bin_op == ast::BinOpKind::Add - || bin_op == ast::BinOpKind::And + // &, *, - + bin_op == ast::BinOpKind::And || bin_op == ast::BinOpKind::Mul || bin_op == ast::BinOpKind::Sub }