aboutsummaryrefslogtreecommitdiff
path: root/crates/assists
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/assists
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/assists')
-rw-r--r--crates/assists/src/handlers/extract_struct_from_enum_variant.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/assists/src/handlers/extract_struct_from_enum_variant.rs b/crates/assists/src/handlers/extract_struct_from_enum_variant.rs
index e3ef04932..5c7678b53 100644
--- a/crates/assists/src/handlers/extract_struct_from_enum_variant.rs
+++ b/crates/assists/src/handlers/extract_struct_from_enum_variant.rs
@@ -151,8 +151,8 @@ fn insert_import(
151 ctx.config.insert_use.prefix_kind, 151 ctx.config.insert_use.prefix_kind,
152 ); 152 );
153 if let Some(mut mod_path) = mod_path { 153 if let Some(mut mod_path) = mod_path {
154 mod_path.segments.pop(); 154 mod_path.pop_segment();
155 mod_path.segments.push(variant_hir_name.clone()); 155 mod_path.push_segment(variant_hir_name.clone());
156 let scope = ImportScope::find_insert_use_container(scope_node, &ctx.sema)?; 156 let scope = ImportScope::find_insert_use_container(scope_node, &ctx.sema)?;
157 *rewriter += insert_use(&scope, mod_path_to_ast(&mod_path), ctx.config.insert_use.merge); 157 *rewriter += insert_use(&scope, mod_path_to_ast(&mod_path), ctx.config.insert_use.merge);
158 } 158 }