diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-10 18:38:46 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-10 18:38:46 +0000 |
commit | a3e747f5ebfafbc61a28f2dcac3f20de4d7ee420 (patch) | |
tree | 195ec048e65baba519213a0a9c9b0143de555376 /crates/ra_ide_api/src/completion/completion_item.rs | |
parent | f96312b8360040086a236279515d178bf26ffb14 (diff) | |
parent | faa1d35cbc29be23667319628e4034348ea50fe9 (diff) |
Merge #487
487: dont complete () if they are already there r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/completion/completion_item.rs')
-rw-r--r-- | crates/ra_ide_api/src/completion/completion_item.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/completion/completion_item.rs b/crates/ra_ide_api/src/completion/completion_item.rs index 334449fae..6a9770429 100644 --- a/crates/ra_ide_api/src/completion/completion_item.rs +++ b/crates/ra_ide_api/src/completion/completion_item.rs | |||
@@ -165,7 +165,7 @@ impl Builder { | |||
165 | 165 | ||
166 | fn from_function(mut self, ctx: &CompletionContext, function: hir::Function) -> Builder { | 166 | fn from_function(mut self, ctx: &CompletionContext, function: hir::Function) -> Builder { |
167 | // If not an import, add parenthesis automatically. | 167 | // If not an import, add parenthesis automatically. |
168 | if ctx.use_item_syntax.is_none() { | 168 | if ctx.use_item_syntax.is_none() && !ctx.is_call { |
169 | if function.signature(ctx.db).args().is_empty() { | 169 | if function.signature(ctx.db).args().is_empty() { |
170 | self.snippet = Some(format!("{}()$0", self.label)); | 170 | self.snippet = Some(format!("{}()$0", self.label)); |
171 | } else { | 171 | } else { |