diff options
author | Aleksey Kladov <[email protected]> | 2019-10-08 18:34:30 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-10-08 18:34:30 +0100 |
commit | f4fa98b1bffe2200580506b83af5383555e1a958 (patch) | |
tree | 34c6219f29db7e7989eb59616a4e00518d448b23 /crates/ra_ide_api/src/completion | |
parent | 5144f3b22ff2c32800672ca0146bce4bc9c805a4 (diff) |
simplify
Diffstat (limited to 'crates/ra_ide_api/src/completion')
-rw-r--r-- | crates/ra_ide_api/src/completion/presentation.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/ra_ide_api/src/completion/presentation.rs b/crates/ra_ide_api/src/completion/presentation.rs index 9946db4ca..2d670372e 100644 --- a/crates/ra_ide_api/src/completion/presentation.rs +++ b/crates/ra_ide_api/src/completion/presentation.rs | |||
@@ -170,12 +170,13 @@ impl Completions { | |||
170 | fn add_adt_with_name(&mut self, ctx: &CompletionContext, name: String, adt: hir::Adt) { | 170 | fn add_adt_with_name(&mut self, ctx: &CompletionContext, name: String, adt: hir::Adt) { |
171 | let builder = CompletionItem::new(CompletionKind::Reference, ctx.source_range(), name); | 171 | let builder = CompletionItem::new(CompletionKind::Reference, ctx.source_range(), name); |
172 | 172 | ||
173 | let (kind, docs) = match adt { | 173 | let kind = match adt { |
174 | hir::Adt::Struct(it) => (CompletionItemKind::Struct, it.docs(ctx.db)), | 174 | hir::Adt::Struct(_) => CompletionItemKind::Struct, |
175 | // FIXME: add CompletionItemKind::Union | 175 | // FIXME: add CompletionItemKind::Union |
176 | hir::Adt::Union(it) => (CompletionItemKind::Struct, it.docs(ctx.db)), | 176 | hir::Adt::Union(_) => CompletionItemKind::Struct, |
177 | hir::Adt::Enum(it) => (CompletionItemKind::Enum, it.docs(ctx.db)), | 177 | hir::Adt::Enum(_) => CompletionItemKind::Enum, |
178 | }; | 178 | }; |
179 | let docs = adt.docs(ctx.db); | ||
179 | 180 | ||
180 | builder.kind(kind).set_documentation(docs).add_to(self) | 181 | builder.kind(kind).set_documentation(docs).add_to(self) |
181 | } | 182 | } |