From b5404514834a27c682dc22d86bc5585c0cae3076 Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Tue, 22 Jan 2019 08:55:05 -0500 Subject: Move docs to Function --- crates/ra_ide_api/src/completion/completion_item.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'crates/ra_ide_api') diff --git a/crates/ra_ide_api/src/completion/completion_item.rs b/crates/ra_ide_api/src/completion/completion_item.rs index dfaadbb20..d70c36889 100644 --- a/crates/ra_ide_api/src/completion/completion_item.rs +++ b/crates/ra_ide_api/src/completion/completion_item.rs @@ -259,9 +259,8 @@ impl Builder { } self.insert_text_format = InsertTextFormat::Snippet; } - let sig = function.signature(ctx.db); - if !sig.documentation().is_empty() { - self.documentation = Some(sig.documentation().clone()); + if let Some(docs) = function.docs(ctx.db) { + self.documentation = Some(docs); } self.kind = Some(CompletionItemKind::Function); -- cgit v1.2.3