From 089b1c57c1774eb1aacec53828ce2d2648adff2d Mon Sep 17 00:00:00 2001 From: Marcus Klaas de Vries Date: Sat, 26 Jan 2019 12:06:41 +0100 Subject: Address some issues flagged in review --- crates/ra_ide_api/src/completion/completion_item.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_ide_api/src/completion') diff --git a/crates/ra_ide_api/src/completion/completion_item.rs b/crates/ra_ide_api/src/completion/completion_item.rs index 6e9a68e40..b16ac2b28 100644 --- a/crates/ra_ide_api/src/completion/completion_item.rs +++ b/crates/ra_ide_api/src/completion/completion_item.rs @@ -240,7 +240,7 @@ impl Builder { if ctx.use_item_syntax.is_none() && !ctx.is_call { tested_by!(inserts_parens_for_function_calls); let sig = function.signature(ctx.db); - if sig.args().is_empty() || sig.has_self_param() && sig.args().len() == 1 { + if sig.params().is_empty() || sig.has_self_param() && sig.params().len() == 1 { self.insert_text = Some(format!("{}()$0", self.label)); } else { self.insert_text = Some(format!("{}($0)", self.label)); -- cgit v1.2.3