Skip to content

Commit

Permalink
Remove + from has_unary_equivalent
Browse files Browse the repository at this point in the history
Rust doesn't has a unary + operator!
  • Loading branch information
Michael Wright committed Nov 6, 2018
1 parent 2353f24 commit c20e17f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions clippy_lints/src/formatting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit c20e17f

Please sign in to comment.