Skip to content

Commit d366710

Browse files
authored
Merge pull request #3192 from mikerite/refactor_20180916
Remove unneeded check for method call
2 parents 183639b + c78cf04 commit d366710

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

clippy_lints/src/map_unit_fn.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
250250
}
251251

252252
if let hir::StmtKind::Semi(ref expr, _) = stmt.node {
253-
if let hir::ExprKind::MethodCall(_, _, _) = expr.node {
254-
if let Some(arglists) = method_chain_args(expr, &["map"]) {
255-
lint_map_unit_fn(cx, stmt, expr, arglists[0]);
256-
}
253+
if let Some(arglists) = method_chain_args(expr, &["map"]) {
254+
lint_map_unit_fn(cx, stmt, expr, arglists[0]);
257255
}
258256
}
259257
}

0 commit comments

Comments
 (0)