From 99c4a41cd1a9f9ef0ee4f067f0069a23123b949a Mon Sep 17 00:00:00 2001 From: yonip23 Date: Thu, 11 Mar 2021 17:46:41 +0200 Subject: use references in CompletionItem's builder --- crates/ide_completion/src/render/enum_variant.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'crates/ide_completion/src/render/enum_variant.rs') diff --git a/crates/ide_completion/src/render/enum_variant.rs b/crates/ide_completion/src/render/enum_variant.rs index ed055c1fb..23c43496e 100644 --- a/crates/ide_completion/src/render/enum_variant.rs +++ b/crates/ide_completion/src/render/enum_variant.rs @@ -59,20 +59,20 @@ impl<'a> EnumRender<'a> { CompletionKind::Reference, self.ctx.source_range(), self.qualified_name.clone(), - ) - .kind(SymbolKind::Variant) - .set_documentation(self.variant.docs(self.ctx.db())) - .set_deprecated(self.ctx.is_deprecated(self.variant)) - .add_import(import_to_add) - .detail(self.detail()); + ); + builder + .kind(SymbolKind::Variant) + .set_documentation(self.variant.docs(self.ctx.db())) + .set_deprecated(self.ctx.is_deprecated(self.variant)) + .add_import(import_to_add) + .detail(self.detail()); if self.variant_kind == StructKind::Tuple { cov_mark::hit!(inserts_parens_for_tuple_enums); let params = Params::Anonymous(self.variant.fields(self.ctx.db()).len()); - builder = - builder.add_call_parens(self.ctx.completion, self.short_qualified_name, params); + builder.add_call_parens(self.ctx.completion, self.short_qualified_name, params); } else if self.path.is_some() { - builder = builder.lookup_by(self.short_qualified_name); + builder.lookup_by(self.short_qualified_name); } builder.build() -- cgit v1.2.3