diff options
| author | jnyfah <jnyfaah@gmail.com> | 2025-02-06 16:18:15 +0100 |
|---|---|---|
| committer | jnyfah <jnyfaah@gmail.com> | 2025-02-06 16:18:15 +0100 |
| commit | 57b241532a605c9b531b755df4823e581ee715ca (patch) | |
| tree | 61a922cc39371c15dc9a537e888817242cd5a504 /src/tools | |
| parent | 98b16ead7c9a958c8332ee13e9772ee7e93fdda0 (diff) | |
collapsing if statement
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/rust-analyzer/crates/ide/src/inlay_hints/bind_pat.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/tools/rust-analyzer/crates/ide/src/inlay_hints/bind_pat.rs b/src/tools/rust-analyzer/crates/ide/src/inlay_hints/bind_pat.rs index fd91cbb0979..4d62561df7a 100644 --- a/src/tools/rust-analyzer/crates/ide/src/inlay_hints/bind_pat.rs +++ b/src/tools/rust-analyzer/crates/ide/src/inlay_hints/bind_pat.rs @@ -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()) }, |
