diff options
Diffstat (limited to 'crates/ide_assists/src/handlers/extract_struct_from_enum_variant.rs')
-rw-r--r-- | crates/ide_assists/src/handlers/extract_struct_from_enum_variant.rs | 4 |
1 files changed, 2 insertions, 2 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 4f0422e96..335e0ed95 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 | |||
@@ -1,7 +1,7 @@ | |||
1 | use std::iter; | 1 | use std::iter; |
2 | 2 | ||
3 | use either::Either; | 3 | use either::Either; |
4 | use hir::{AsName, Module, ModuleDef, Name, Variant}; | 4 | use hir::{Module, ModuleDef, Name, Variant}; |
5 | use ide_db::{ | 5 | use ide_db::{ |
6 | defs::Definition, | 6 | defs::Definition, |
7 | helpers::{ | 7 | helpers::{ |
@@ -133,7 +133,7 @@ fn existing_definition(db: &RootDatabase, variant_name: &ast::Name, variant: &Va | |||
133 | ), | 133 | ), |
134 | _ => false, | 134 | _ => false, |
135 | }) | 135 | }) |
136 | .any(|(name, _)| name == variant_name.as_name()) | 136 | .any(|(name, _)| name.to_string() == variant_name.to_string()) |
137 | } | 137 | } |
138 | 138 | ||
139 | fn insert_import( | 139 | fn insert_import( |