Skip to content

Commit dbef783

Browse files
committed
call args "args" in the Call case as well
since that's what they are
1 parent 77c96c0 commit dbef783

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clippy_lints/src/double_parens.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ impl EarlyLintPass for DoubleParens {
4242
fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) {
4343
let span = match &expr.kind {
4444
ExprKind::Paren(in_paren) if matches!(in_paren.kind, ExprKind::Paren(_) | ExprKind::Tup(_)) => expr.span,
45-
ExprKind::Call(_, params)
46-
if let [param] = &**params
47-
&& let ExprKind::Paren(_) = param.kind =>
45+
ExprKind::Call(_, args)
46+
if let [args] = &**args
47+
&& let ExprKind::Paren(_) = args.kind =>
4848
{
49-
param.span
49+
args.span
5050
},
5151
ExprKind::MethodCall(call)
5252
if let [arg] = &*call.args

0 commit comments

Comments
 (0)