Skip to content

Commit

Permalink
collapsing if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
jnyfah committed Feb 6, 2025
1 parent 98b16ea commit 57b2415
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ pub(super) fn hints(
if it.ty().is_some() {
return None;
}
if config.hide_closure_parameter_hints {
if it.syntax().ancestors().any(|n| matches!(ast::Expr::cast(n), Some(ast::Expr::ClosureExpr(_)))) {
return None;
}
if config.hide_closure_parameter_hints && it.syntax().ancestors().any(|n| matches!(ast::Expr::cast(n), Some(ast::Expr::ClosureExpr(_)))) {
return None;
}
Some(it.colon_token())
},
Expand Down

0 comments on commit 57b2415

Please sign in to comment.