Skip to content

Commit 57b2415

Browse files
committed
collapsing if statement
1 parent 98b16ea commit 57b2415

File tree

1 file changed

+2
-4
lines changed
  • src/tools/rust-analyzer/crates/ide/src/inlay_hints

1 file changed

+2
-4
lines changed

src/tools/rust-analyzer/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)