Skip to content

Commit 6b32875

Browse files
committed
collapsing if statement
1 parent 4522bf4 commit 6b32875

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

crates/ide/src/inlay_hints/bind_pat.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,8 @@ pub(super) fn hints(
3636
if it.ty().is_some() {
3737
return None;
3838
}
39-
if config.hide_closure_parameter_hints {
40-
if it.syntax().ancestors().any(|n| matches!(ast::Expr::cast(n), Some(ast::Expr::ClosureExpr(_)))) {
41-
return None;
42-
}
39+
if config.hide_closure_parameter_hints && it.syntax().ancestors().any(|n| matches!(ast::Expr::cast(n), Some(ast::Expr::ClosureExpr(_)))) {
40+
return None;
4341
}
4442
Some(it.colon_token())
4543
},

0 commit comments

Comments
 (0)