Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 0426913

Browse files
fix dogfood
1 parent 3318249 commit 0426913

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

clippy_lints/src/redundant_closure_call.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,16 +176,15 @@ impl<'tcx> LateLintPass<'tcx> for RedundantClosureCall {
176176
hint = hint.asyncify();
177177
}
178178

179-
let is_in_fn_call_arg = clippy_utils::get_parent_node(cx.tcx, expr.hir_id)
180-
.map(|x| match x {
179+
let is_in_fn_call_arg =
180+
clippy_utils::get_parent_node(cx.tcx, expr.hir_id).is_some_and(|x| match x {
181181
Node::Expr(expr) => matches!(expr.kind, hir::ExprKind::Call(_, _)),
182182
_ => false,
183-
})
184-
.unwrap_or(false);
183+
});
185184

186185
// avoid clippy::double_parens
187186
if !is_in_fn_call_arg {
188-
hint = hint.maybe_par()
187+
hint = hint.maybe_par();
189188
};
190189

191190
diag.span_suggestion(full_expr.span, "try doing something like", hint, applicability);

0 commit comments

Comments
 (0)