mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
Move data to a single file
This commit is contained in:
parent
78f3b0627c
commit
b315f05cf1
8 changed files with 213 additions and 254 deletions
|
@ -224,12 +224,11 @@ impl Completions {
|
|||
&& ctx.db.feature_flags.get("completion.insertion.add-call-parenthesis")
|
||||
{
|
||||
tested_by!(inserts_parens_for_function_calls);
|
||||
let (snippet, label) =
|
||||
if params.is_empty() || has_self_param && params.len() == 1 {
|
||||
(format!("{}()$0", func_name), format!("{}()", name))
|
||||
} else {
|
||||
(format!("{}($0)", func_name), format!("{}(…)", name))
|
||||
};
|
||||
let (snippet, label) = if params.is_empty() || has_self_param && params.len() == 1 {
|
||||
(format!("{}()$0", func_name), format!("{}()", name))
|
||||
} else {
|
||||
(format!("{}($0)", func_name), format!("{}(…)", name))
|
||||
};
|
||||
builder = builder.lookup_by(name).label(label).insert_snippet(snippet);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue