mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-28 14:03:35 +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(|(mod_path, _)| mod_path.len() > 1)
|
||||||
.filter_map(|(import_path, definition)| {
|
.filter_map(|(import_path, definition)| {
|
||||||
let ie =
|
render_resolution_with_import(
|
||||||
ImportEdit { import_path: import_path.clone(), import_scope: import_scope.clone() };
|
RenderContext::new(ctx),
|
||||||
{
|
ImportEdit { import_path: import_path.clone(), import_scope: import_scope.clone() },
|
||||||
let _p = profile::span("totextedit");
|
&definition,
|
||||||
ie.to_text_edit(ctx.config.merge);
|
)
|
||||||
}
|
|
||||||
render_resolution_with_import(RenderContext::new(ctx), ie, &definition)
|
|
||||||
});
|
});
|
||||||
|
|
||||||
acc.add_all(possible_imports);
|
acc.add_all(possible_imports);
|
||||||
|
|
Loading…
Reference in a new issue