Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-completion/src/render/literal.rs')
| -rw-r--r-- | crates/ide-completion/src/render/literal.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ide-completion/src/render/literal.rs b/crates/ide-completion/src/render/literal.rs index b218502f7f..f2d67df01d 100644 --- a/crates/ide-completion/src/render/literal.rs +++ b/crates/ide-completion/src/render/literal.rs @@ -57,11 +57,11 @@ fn render( ) -> Option<Builder> { let db = completion.db; let mut kind = thing.kind(db); - let should_add_parens = match &path_ctx { - PathCompletionCtx { has_call_parens: true, .. } => false, - PathCompletionCtx { kind: PathKind::Use | PathKind::Type { .. }, .. } => false, - _ => true, - }; + let should_add_parens = !matches!( + path_ctx, + PathCompletionCtx { has_call_parens: true, .. } + | PathCompletionCtx { kind: PathKind::Use | PathKind::Type { .. }, .. } + ); let fields = thing.fields(completion)?; let (qualified_name, short_qualified_name, qualified) = match path { |