aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-11-22 14:32:10 +0000
committerAleksey Kladov <[email protected]>2019-11-22 14:32:10 +0000
commitb315f05cf160a11b9012fcde2a9aefc240e39135 (patch)
treeced460568980b0bd71ad95267c89f320ce324ba4 /crates/ra_ide_api/src
parent78f3b0627cf4a5d34aaf63c7b5a2e1b744a11b14 (diff)
Move data to a single file
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r--crates/ra_ide_api/src/completion/presentation.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/crates/ra_ide_api/src/completion/presentation.rs b/crates/ra_ide_api/src/completion/presentation.rs
index 50fdb0043..896ad1517 100644
--- a/crates/ra_ide_api/src/completion/presentation.rs
+++ b/crates/ra_ide_api/src/completion/presentation.rs
@@ -224,12 +224,11 @@ impl Completions {
224 && ctx.db.feature_flags.get("completion.insertion.add-call-parenthesis") 224 && ctx.db.feature_flags.get("completion.insertion.add-call-parenthesis")
225 { 225 {
226 tested_by!(inserts_parens_for_function_calls); 226 tested_by!(inserts_parens_for_function_calls);
227 let (snippet, label) = 227 let (snippet, label) = if params.is_empty() || has_self_param && params.len() == 1 {
228 if params.is_empty() || has_self_param && params.len() == 1 { 228 (format!("{}()$0", func_name), format!("{}()", name))
229 (format!("{}()$0", func_name), format!("{}()", name)) 229 } else {
230 } else { 230 (format!("{}($0)", func_name), format!("{}(…)", name))
231 (format!("{}($0)", func_name), format!("{}(…)", name)) 231 };
232 };
233 builder = builder.lookup_by(name).label(label).insert_snippet(snippet); 232 builder = builder.lookup_by(name).label(label).insert_snippet(snippet);
234 } 233 }
235 234