Skip to content

Commit 1f8a5f2

Browse files
committed
make dogfood happy
1 parent 9896c1c commit 1f8a5f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/matches/try_err.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>, scrutine
5858
let span = hygiene::walk_chain(err_arg.span, try_arg.span.ctxt());
5959
let mut applicability = Applicability::MachineApplicable;
6060
let origin_snippet = snippet_with_applicability(cx, span, "_", &mut applicability);
61-
let ret_prefix = if get_parent_expr(cx, expr).map_or(false, |e| matches!(e.kind, ExprKind::Ret(_))) {
61+
let ret_prefix = if get_parent_expr(cx, expr).is_some_and(|e| matches!(e.kind, ExprKind::Ret(_))) {
6262
"" // already returns
6363
} else {
6464
"return "

0 commit comments

Comments
 (0)