]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/if_let_mutex.rs
separate the receiver from arguments in HIR under /clippy
[rust.git] / clippy_lints / src / if_let_mutex.rs
index 4d703d691acc2f81e57296256027072221c27214..9ea8c494cfcdab4a0fd71e5dbe80433fd4e2f8b1 100644 (file)
@@ -129,7 +129,7 @@ fn found_mutex_if_same_as(&self, op_mutex: &Expr<'_>) -> Option<&Expr<'_>> {
 
 fn is_mutex_lock_call<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> Option<&'tcx Expr<'tcx>> {
     if_chain! {
-        if let ExprKind::MethodCall(path, [self_arg, ..], _) = &expr.kind;
+        if let ExprKind::MethodCall(path, self_arg, ..) = &expr.kind;
         if path.ident.as_str() == "lock";
         let ty = cx.typeck_results().expr_ty(self_arg).peel_refs();
         if is_type_diagnostic_item(cx, ty, sym::Mutex);