diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-12-10 15:32:23 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-10 15:32:23 +0000 |
commit | 5a6065e3b05e2624c4c340f928b20c04ce579928 (patch) | |
tree | 87d88e58657a266ad19ef28cefb82fd121010d34 /crates/completion/src/completions | |
parent | a6c8098113505009453b12c8b461dd905f299c05 (diff) | |
parent | 78de7f0d4a53e92c343b0c12889b423f1f9bd433 (diff) |
Merge #6802
6802: Minor, more orthogonal code r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/completion/src/completions')
-rw-r--r-- | crates/completion/src/completions/unqualified_path.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/crates/completion/src/completions/unqualified_path.rs b/crates/completion/src/completions/unqualified_path.rs index 544886d29..2b0924ae5 100644 --- a/crates/completion/src/completions/unqualified_path.rs +++ b/crates/completion/src/completions/unqualified_path.rs | |||
@@ -145,13 +145,11 @@ fn fuzzy_completion(acc: &mut Completions, ctx: &CompletionContext) -> Option<() | |||
145 | }) | 145 | }) |
146 | .filter(|(mod_path, _)| mod_path.len() > 1) | 146 | .filter(|(mod_path, _)| mod_path.len() > 1) |
147 | .filter_map(|(import_path, definition)| { | 147 | .filter_map(|(import_path, definition)| { |
148 | let ie = | 148 | render_resolution_with_import( |
149 | ImportEdit { import_path: import_path.clone(), import_scope: import_scope.clone() }; | 149 | RenderContext::new(ctx), |
150 | { | 150 | ImportEdit { import_path: import_path.clone(), import_scope: import_scope.clone() }, |
151 | let _p = profile::span("totextedit"); | 151 | &definition, |
152 | ie.to_text_edit(ctx.config.merge); | 152 | ) |
153 | } | ||
154 | render_resolution_with_import(RenderContext::new(ctx), ie, &definition) | ||
155 | }); | 153 | }); |
156 | 154 | ||
157 | acc.add_all(possible_imports); | 155 | acc.add_all(possible_imports); |