We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 40ee620 commit fb4f9a0Copy full SHA for fb4f9a0
clippy_lints/src/map_identity.rs
@@ -61,7 +61,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MapIdentity {
61
/// map(). Otherwise, returns None.
62
fn get_map_argument<'a>(cx: &LateContext<'_, '_>, expr: &'a Expr<'a>) -> Option<&'a [Expr<'a>]> {
63
if_chain! {
64
- if let ExprKind::MethodCall(ref method, _, ref args) = expr.kind;
+ if let ExprKind::MethodCall(ref method, _, ref args, _) = expr.kind;
65
if args.len() == 2 && method.ident.as_str() == "map";
66
let caller_ty = cx.tables.expr_ty(&args[0]);
67
if match_trait_method(cx, expr, &paths::ITERATOR)
0 commit comments