Handle case where detail doesn't exist without giving up on completion

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
Nick Spain 2021-01-02 09:48:51 +11:00 committed by Nick Spain
parent 3a1f8e897b
commit 5c659c21dd

View File

@ -45,7 +45,7 @@ impl<'a> MacroRender<'a> {
.set_documentation(self.docs.clone())
.set_deprecated(self.ctx.is_deprecated(self.macro_))
.add_import(import_to_add)
.detail(self.detail()?);
.set_detail(self.detail());
let needs_bang = self.needs_bang();
builder = match self.ctx.snippet_cap() {