aboutsummaryrefslogtreecommitdiff
path: root/crates/completion/src/render.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-02-04 19:59:21 +0000
committerGitHub <[email protected]>2021-02-04 19:59:21 +0000
commitde046bf4572a75cf534a2342358a422b2f18d01c (patch)
tree87f58e72537569806e689a6be4c404a496431360 /crates/completion/src/render.rs
parent4c1fcda0f8183060de5a341fffa2b30e65bdb52f (diff)
parent5d99ba1d9a5acf02a5cd50e456f164bd80b523b5 (diff)
Merge #7559
7559: Make `ModPath`'s representation private r=jonas-schievink a=jonas-schievink This lets us switch out the `Vec` for something more efficient bors r+ Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/completion/src/render.rs')
-rw-r--r--crates/completion/src/render.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/completion/src/render.rs b/crates/completion/src/render.rs
index e11b881ca..eddaaa6f3 100644
--- a/crates/completion/src/render.rs
+++ b/crates/completion/src/render.rs
@@ -57,7 +57,7 @@ pub(crate) fn render_resolution_with_import<'a>(
57 ScopeDef::ModuleDef(ModuleDef::Function(f)) => f.name(ctx.completion.db).to_string(), 57 ScopeDef::ModuleDef(ModuleDef::Function(f)) => f.name(ctx.completion.db).to_string(),
58 ScopeDef::ModuleDef(ModuleDef::Const(c)) => c.name(ctx.completion.db)?.to_string(), 58 ScopeDef::ModuleDef(ModuleDef::Const(c)) => c.name(ctx.completion.db)?.to_string(),
59 ScopeDef::ModuleDef(ModuleDef::TypeAlias(t)) => t.name(ctx.completion.db).to_string(), 59 ScopeDef::ModuleDef(ModuleDef::TypeAlias(t)) => t.name(ctx.completion.db).to_string(),
60 _ => import_edit.import_path.segments.last()?.to_string(), 60 _ => import_edit.import_path.segments().last()?.to_string(),
61 }; 61 };
62 Render::new(ctx).render_resolution(local_name, Some(import_edit), resolution).map(|mut item| { 62 Render::new(ctx).render_resolution(local_name, Some(import_edit), resolution).map(|mut item| {
63 item.completion_kind = CompletionKind::Magic; 63 item.completion_kind = CompletionKind::Magic;