mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 01:17:16 +00:00
Remove +
from has_unary_equivalent
Rust doesn't has a unary + operator!
This commit is contained in:
parent
2353f24095
commit
c20e17f8ee
1 changed files with 2 additions and 3 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue