diff options
Diffstat (limited to 'crates/ide_assists')
-rw-r--r-- | crates/ide_assists/src/handlers/extract_struct_from_enum_variant.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/crates/ide_assists/src/handlers/extract_struct_from_enum_variant.rs b/crates/ide_assists/src/handlers/extract_struct_from_enum_variant.rs index 335e0ed95..596c536a7 100644 --- a/crates/ide_assists/src/handlers/extract_struct_from_enum_variant.rs +++ b/crates/ide_assists/src/handlers/extract_struct_from_enum_variant.rs | |||
@@ -145,11 +145,8 @@ fn insert_import( | |||
145 | variant_hir_name: &Name, | 145 | variant_hir_name: &Name, |
146 | ) -> Option<()> { | 146 | ) -> Option<()> { |
147 | let db = ctx.db(); | 147 | let db = ctx.db(); |
148 | let mod_path = module.find_use_path_prefixed( | 148 | let mod_path = |
149 | db, | 149 | module.find_use_path_prefixed(db, *enum_module_def, ctx.config.insert_use.prefix_kind); |
150 | enum_module_def.clone(), | ||
151 | ctx.config.insert_use.prefix_kind, | ||
152 | ); | ||
153 | if let Some(mut mod_path) = mod_path { | 150 | if let Some(mut mod_path) = mod_path { |
154 | mod_path.pop_segment(); | 151 | mod_path.pop_segment(); |
155 | mod_path.push_segment(variant_hir_name.clone()); | 152 | mod_path.push_segment(variant_hir_name.clone()); |