Fix rustfmt
This commit is contained in:
parent
ddc68433a3
commit
426660f00c
|
@ -97,8 +97,11 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AssignOps {
|
||||||
|db| if let (Some(snip_a), Some(snip_r)) =
|
|db| if let (Some(snip_a), Some(snip_r)) =
|
||||||
(snippet_opt(cx, assignee.span), snippet_opt(cx, rhs.span)) {
|
(snippet_opt(cx, assignee.span), snippet_opt(cx, rhs.span)) {
|
||||||
db.span_suggestion(expr.span,
|
db.span_suggestion(expr.span,
|
||||||
"replace it with",
|
"replace it with",
|
||||||
format!("{} {}= {}", snip_a, op.node.as_str(), snip_r));
|
format!("{} {}= {}",
|
||||||
|
snip_a,
|
||||||
|
op.node.as_str(),
|
||||||
|
snip_r));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// lhs op= l op r
|
// lhs op= l op r
|
||||||
|
@ -178,8 +181,11 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AssignOps {
|
||||||
|db| if let (Some(snip_a), Some(snip_r)) =
|
|db| if let (Some(snip_a), Some(snip_r)) =
|
||||||
(snippet_opt(cx, assignee.span), snippet_opt(cx, rhs.span)) {
|
(snippet_opt(cx, assignee.span), snippet_opt(cx, rhs.span)) {
|
||||||
db.span_suggestion(expr.span,
|
db.span_suggestion(expr.span,
|
||||||
"replace it with",
|
"replace it with",
|
||||||
format!("{} {}= {}", snip_a, op.node.as_str(), snip_r));
|
format!("{} {}= {}",
|
||||||
|
snip_a,
|
||||||
|
op.node.as_str(),
|
||||||
|
snip_r));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue