aboutsummaryrefslogtreecommitdiff
path: root/crates/completion/src/render
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
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')
-rw-r--r--crates/completion/src/render/enum_variant.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/completion/src/render/enum_variant.rs b/crates/completion/src/render/enum_variant.rs
index adcddebd1..9214193b4 100644
--- a/crates/completion/src/render/enum_variant.rs
+++ b/crates/completion/src/render/enum_variant.rs
@@ -45,8 +45,8 @@ impl<'a> EnumRender<'a> {
45 let (qualified_name, short_qualified_name) = match &path { 45 let (qualified_name, short_qualified_name) = match &path {
46 Some(path) => { 46 Some(path) => {
47 let full = path.to_string(); 47 let full = path.to_string();
48 let short = 48 let segments = path.segments();
49 path.segments[path.segments.len().saturating_sub(2)..].iter().join("::"); 49 let short = segments[segments.len().saturating_sub(2)..].iter().join("::");
50 (full, short) 50 (full, short)
51 } 51 }
52 None => (name.to_string(), name.to_string()), 52 None => (name.to_string(), name.to_string()),