Skip to content

Commit c20e17f

Browse files
author
Michael Wright
committed
Remove + from has_unary_equivalent
Rust doesn't has a unary + operator!
1 parent 2353f24 commit c20e17f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clippy_lints/src/formatting.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,8 @@ fn check_else_if(cx: &EarlyContext<'_>, expr: &ast::Expr) {
174174
}
175175

176176
fn has_unary_equivalent(bin_op: ast::BinOpKind) -> bool {
177-
//+, &, *, -
178-
bin_op == ast::BinOpKind::Add
179-
|| bin_op == ast::BinOpKind::And
177+
// &, *, -
178+
bin_op == ast::BinOpKind::And
180179
|| bin_op == ast::BinOpKind::Mul
181180
|| bin_op == ast::BinOpKind::Sub
182181
}

0 commit comments

Comments
 (0)