Skip to content

Commit d171e89

Browse files
author
Michael Wright
committed
Fix clippy error
1 parent a9c8d1b commit d171e89

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

clippy_lints/src/temporary_assignment.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,10 @@ impl LintPass for Pass {
4040
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
4141
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
4242
if let ExprAssign(ref target, _) = expr.node {
43-
match target.node {
44-
ExprField(ref base, _) => if is_temporary(base) && !is_adjusted(cx, base) {
43+
if let ExprField(ref base, _) = target.node {
44+
if is_temporary(base) && !is_adjusted(cx, base) {
4545
span_lint(cx, TEMPORARY_ASSIGNMENT, expr.span, "assignment to temporary");
46-
},
47-
_ => (),
46+
}
4847
}
4948
}
5049
}

0 commit comments

Comments
 (0)