mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Refactor the code
This commit is contained in:
parent
d9bd1f171d
commit
50e06ee95a
11 changed files with 48 additions and 34 deletions
|
@ -194,7 +194,10 @@ impl<'a> Render<'a> {
|
|||
local_name,
|
||||
)
|
||||
.kind(CompletionItemKind::UnresolvedReference)
|
||||
.add_import(import_to_add, self.ctx.completion.config.should_resolve_immediately())
|
||||
.add_import(
|
||||
import_to_add,
|
||||
self.ctx.completion.config.should_resolve_additional_edits_immediately(),
|
||||
)
|
||||
.build();
|
||||
return Some(item);
|
||||
}
|
||||
|
@ -249,7 +252,10 @@ impl<'a> Render<'a> {
|
|||
|
||||
let item = item
|
||||
.kind(kind)
|
||||
.add_import(import_to_add, self.ctx.completion.config.should_resolve_immediately())
|
||||
.add_import(
|
||||
import_to_add,
|
||||
self.ctx.completion.config.should_resolve_additional_edits_immediately(),
|
||||
)
|
||||
.set_documentation(docs)
|
||||
.set_ref_match(ref_match)
|
||||
.build();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue