Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/handlers/generate_from_impl_for_enum.rs')
-rw-r--r--crates/ide-assists/src/handlers/generate_from_impl_for_enum.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide-assists/src/handlers/generate_from_impl_for_enum.rs b/crates/ide-assists/src/handlers/generate_from_impl_for_enum.rs
index 742f1f78c2..6091f06b96 100644
--- a/crates/ide-assists/src/handlers/generate_from_impl_for_enum.rs
+++ b/crates/ide-assists/src/handlers/generate_from_impl_for_enum.rs
@@ -90,7 +90,7 @@ fn existing_from_impl(
let enum_type = enum_.ty(sema.db);
- let wrapped_type = variant.fields(sema.db).get(0)?.ty(sema.db);
+ let wrapped_type = variant.fields(sema.db).first()?.ty(sema.db);
if enum_type.impls_trait(sema.db, from_trait, &[wrapped_type]) {
Some(())