diff options
Diffstat (limited to 'crates/ide_assists/src/handlers/fill_match_arms.rs')
-rw-r--r-- | crates/ide_assists/src/handlers/fill_match_arms.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide_assists/src/handlers/fill_match_arms.rs b/crates/ide_assists/src/handlers/fill_match_arms.rs index 3d2cd739a..c8bc923f5 100644 --- a/crates/ide_assists/src/handlers/fill_match_arms.rs +++ b/crates/ide_assists/src/handlers/fill_match_arms.rs | |||
@@ -212,7 +212,7 @@ impl ExtendedEnum { | |||
212 | } | 212 | } |
213 | 213 | ||
214 | fn resolve_enum_def(sema: &Semantics<RootDatabase>, expr: &ast::Expr) -> Option<ExtendedEnum> { | 214 | fn resolve_enum_def(sema: &Semantics<RootDatabase>, expr: &ast::Expr) -> Option<ExtendedEnum> { |
215 | sema.type_of_expr(&expr)?.autoderef(sema.db).find_map(|ty| match ty.as_adt() { | 215 | sema.type_of_expr(expr)?.autoderef(sema.db).find_map(|ty| match ty.as_adt() { |
216 | Some(Adt::Enum(e)) => Some(ExtendedEnum::Enum(e)), | 216 | Some(Adt::Enum(e)) => Some(ExtendedEnum::Enum(e)), |
217 | _ => { | 217 | _ => { |
218 | if ty.is_bool() { | 218 | if ty.is_bool() { |
@@ -228,7 +228,7 @@ fn resolve_tuple_of_enum_def( | |||
228 | sema: &Semantics<RootDatabase>, | 228 | sema: &Semantics<RootDatabase>, |
229 | expr: &ast::Expr, | 229 | expr: &ast::Expr, |
230 | ) -> Option<Vec<ExtendedEnum>> { | 230 | ) -> Option<Vec<ExtendedEnum>> { |
231 | sema.type_of_expr(&expr)? | 231 | sema.type_of_expr(expr)? |
232 | .tuple_fields(sema.db) | 232 | .tuple_fields(sema.db) |
233 | .iter() | 233 | .iter() |
234 | .map(|ty| { | 234 | .map(|ty| { |