diff options
| author | Teddy_Wang <wangtheo662@gmail.com> | 2020-06-23 11:40:38 -0400 |
|---|---|---|
| committer | Teddy_Wang <wangtheo662@gmail.com> | 2020-06-23 11:40:38 -0400 |
| commit | fb4f9a0ad7a4656beb01c85b02b3e6ef15d914ec (patch) | |
| tree | ed356bf08562c682def98cae56ffa63cd6bdf11a | |
| parent | 40ee620e51c86c72e3c2b65df71f5f0a4a79797f (diff) | |
| download | rust-fb4f9a0ad7a4656beb01c85b02b3e6ef15d914ec.tar.gz rust-fb4f9a0ad7a4656beb01c85b02b3e6ef15d914ec.zip | |
Fix pattern match of ExprKind::MethodCall
| -rw-r--r-- | clippy_lints/src/map_identity.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/map_identity.rs b/clippy_lints/src/map_identity.rs index 9bc8f1bec1b..6607a26b130 100644 --- a/clippy_lints/src/map_identity.rs +++ b/clippy_lints/src/map_identity.rs @@ -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) |
