aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/fill_match_arms.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src/fill_match_arms.rs')
-rw-r--r--crates/ra_assists/src/fill_match_arms.rs4
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 @@
1use std::iter; 1use std::iter;
2 2
3use hir::{db::HirDatabase, AdtDef, HasSource}; 3use hir::{db::HirDatabase, Adt, HasSource};
4use ra_syntax::ast::{self, AstNode, NameOwner}; 4use ra_syntax::ast::{self, AstNode, NameOwner};
5 5
6use crate::{ast_editor::AstBuilder, Assist, AssistCtx, AssistId}; 6use 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}