diff options
Diffstat (limited to 'crates/ra_ide/src/completion/presentation.rs')
-rw-r--r-- | crates/ra_ide/src/completion/presentation.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/ra_ide/src/completion/presentation.rs b/crates/ra_ide/src/completion/presentation.rs index 5f056730a..97475fc0b 100644 --- a/crates/ra_ide/src/completion/presentation.rs +++ b/crates/ra_ide/src/completion/presentation.rs | |||
@@ -267,10 +267,7 @@ impl Completions { | |||
267 | 267 | ||
268 | pub(crate) fn add_enum_variant(&mut self, ctx: &CompletionContext, variant: hir::EnumVariant) { | 268 | pub(crate) fn add_enum_variant(&mut self, ctx: &CompletionContext, variant: hir::EnumVariant) { |
269 | let is_deprecated = is_deprecated(variant, ctx.db); | 269 | let is_deprecated = is_deprecated(variant, ctx.db); |
270 | let name = match variant.name(ctx.db) { | 270 | let name = variant.name(ctx.db); |
271 | Some(it) => it, | ||
272 | None => return, | ||
273 | }; | ||
274 | let detail_types = variant.fields(ctx.db).into_iter().map(|field| field.ty(ctx.db)); | 271 | let detail_types = variant.fields(ctx.db).into_iter().map(|field| field.ty(ctx.db)); |
275 | let detail = join(detail_types.map(|t| t.display(ctx.db).to_string())) | 272 | let detail = join(detail_types.map(|t| t.display(ctx.db).to_string())) |
276 | .separator(", ") | 273 | .separator(", ") |