Merge pull request #3192 from mikerite/refactor_20180916

Remove unneeded check for method call
This commit is contained in:
Philipp Krones 2018-09-16 13:46:12 +02:00 committed by GitHub
commit d366710a01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -250,10 +250,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
}
if let hir::StmtKind::Semi(ref expr, _) = stmt.node {
if let hir::ExprKind::MethodCall(_, _, _) = expr.node {
if let Some(arglists) = method_chain_args(expr, &["map"]) {
lint_map_unit_fn(cx, stmt, expr, arglists[0]);
}
if let Some(arglists) = method_chain_args(expr, &["map"]) {
lint_map_unit_fn(cx, stmt, expr, arglists[0]);
}
}
}