- span_lint_and_then(cx,
- ASSIGN_OPS,
- expr.span,
- "assign operation detected",
- |db| {
- match rhs.node {
- hir::ExprBinary(op2, _, _) if op2 != op => {
- db.span_suggestion(expr.span,
- "replace it with",
- format!("{} = {} {} ({})", l, l, op.node.as_str(), r));
- },
- _ => {
- db.span_suggestion(expr.span,
- "replace it with",
- format!("{} = {} {} {}", l, l, op.node.as_str(), r));
- }
- }
- });
+ span_lint_and_then(cx, ASSIGN_OPS, expr.span, "assign operation detected", |db| {
+ match rhs.node {
+ hir::ExprBinary(op2, _, _) if op2 != op => {
+ db.span_suggestion(expr.span,
+ "replace it with",
+ format!("{} = {} {} ({})", l, l, op.node.as_str(), r));
+ }
+ _ => {
+ db.span_suggestion(expr.span,
+ "replace it with",
+ format!("{} = {} {} {}", l, l, op.node.as_str(), r));
+ }
+ }
+ });