Remove `+` from `has_unary_equivalent`

Rust doesn't has a unary + operator!
This commit is contained in:
Michael Wright 2018-11-06 07:05:13 +02:00
parent 2353f24095
commit c20e17f8ee
1 changed files with 2 additions and 3 deletions

View File

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