mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
use references in CompletionItem's builder
This commit is contained in:
parent
db6364fecc
commit
99c4a41cd1
17 changed files with 183 additions and 166 deletions
|
@ -52,11 +52,11 @@ impl Builder {
|
|||
}
|
||||
|
||||
pub(super) fn add_call_parens(
|
||||
mut self,
|
||||
&mut self,
|
||||
ctx: &CompletionContext,
|
||||
name: String,
|
||||
params: Params,
|
||||
) -> Builder {
|
||||
) -> &mut Builder {
|
||||
if !self.should_add_parens(ctx) {
|
||||
return self;
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ impl Builder {
|
|||
let (snippet, label) = if params.is_empty() {
|
||||
(format!("{}()$0", name), format!("{}()", name))
|
||||
} else {
|
||||
self = self.trigger_call_info();
|
||||
self.trigger_call_info();
|
||||
let snippet = match (ctx.config.add_call_argument_snippets, params) {
|
||||
(true, Params::Named(params)) => {
|
||||
let function_params_snippet =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue