Skip to content

Commit

Permalink
Fix pattern match of ExprKind::MethodCall
Browse files Browse the repository at this point in the history
  • Loading branch information
theo-lw committed Jun 23, 2020
1 parent 40ee620 commit fb4f9a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_lints/src/map_identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MapIdentity {
/// map(). Otherwise, returns None.
fn get_map_argument<'a>(cx: &LateContext<'_, '_>, expr: &'a Expr<'a>) -> Option<&'a [Expr<'a>]> {
if_chain! {
if let ExprKind::MethodCall(ref method, _, ref args) = expr.kind;
if let ExprKind::MethodCall(ref method, _, ref args, _) = expr.kind;
if args.len() == 2 && method.ident.as_str() == "map";
let caller_ty = cx.tables.expr_ty(&args[0]);
if match_trait_method(cx, expr, &paths::ITERATOR)
Expand Down

0 comments on commit fb4f9a0

Please sign in to comment.