mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
Merge #6802
6802: Minor, more orthogonal code r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
5a6065e3b0
1 changed files with 5 additions and 7 deletions
|
@ -145,13 +145,11 @@ fn fuzzy_completion(acc: &mut Completions, ctx: &CompletionContext) -> Option<()
|
|||
})
|
||||
.filter(|(mod_path, _)| mod_path.len() > 1)
|
||||
.filter_map(|(import_path, definition)| {
|
||||
let ie =
|
||||
ImportEdit { import_path: import_path.clone(), import_scope: import_scope.clone() };
|
||||
{
|
||||
let _p = profile::span("totextedit");
|
||||
ie.to_text_edit(ctx.config.merge);
|
||||
}
|
||||
render_resolution_with_import(RenderContext::new(ctx), ie, &definition)
|
||||
render_resolution_with_import(
|
||||
RenderContext::new(ctx),
|
||||
ImportEdit { import_path: import_path.clone(), import_scope: import_scope.clone() },
|
||||
&definition,
|
||||
)
|
||||
});
|
||||
|
||||
acc.add_all(possible_imports);
|
||||
|
|
Loading…
Reference in a new issue