diff options
author | Jonas Schievink <[email protected]> | 2021-02-04 19:49:24 +0000 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2021-02-04 19:49:24 +0000 |
commit | 5d99ba1d9a5acf02a5cd50e456f164bd80b523b5 (patch) | |
tree | 073b41689b789308030b4df4344c3aa147cba195 /crates/assists/src | |
parent | 36191543a679d4e01c206d2e98a2d7ae170a25e2 (diff) |
Make `ModPath`'s representation private
Diffstat (limited to 'crates/assists/src')
-rw-r--r-- | crates/assists/src/handlers/extract_struct_from_enum_variant.rs | 4 |
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 | } |