diff options
Diffstat (limited to 'crates/ra_assists')
-rw-r--r-- | crates/ra_assists/src/fill_match_arms.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/fill_match_arms.rs b/crates/ra_assists/src/fill_match_arms.rs index cc3879562..543ed164c 100644 --- a/crates/ra_assists/src/fill_match_arms.rs +++ b/crates/ra_assists/src/fill_match_arms.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | use std::iter; | 1 | use std::iter; |
2 | 2 | ||
3 | use hir::{db::HirDatabase, AdtDef, HasSource}; | 3 | use hir::{db::HirDatabase, Adt, HasSource}; |
4 | use ra_syntax::ast::{self, AstNode, NameOwner}; | 4 | use ra_syntax::ast::{self, AstNode, NameOwner}; |
5 | 5 | ||
6 | use crate::{ast_editor::AstBuilder, Assist, AssistCtx, AssistId}; | 6 | use crate::{ast_editor::AstBuilder, Assist, AssistCtx, AssistId}; |
@@ -60,7 +60,7 @@ fn resolve_enum_def( | |||
60 | let expr_ty = analyzer.type_of(db, &expr)?; | 60 | let expr_ty = analyzer.type_of(db, &expr)?; |
61 | 61 | ||
62 | analyzer.autoderef(db, expr_ty).find_map(|ty| match ty.as_adt() { | 62 | analyzer.autoderef(db, expr_ty).find_map(|ty| match ty.as_adt() { |
63 | Some((AdtDef::Enum(e), _)) => Some(e.source(db).ast), | 63 | Some((Adt::Enum(e), _)) => Some(e.source(db).ast), |
64 | _ => None, | 64 | _ => None, |
65 | }) | 65 | }) |
66 | } | 66 | } |