diff options
Diffstat (limited to 'crates/assists/src/utils.rs')
-rw-r--r-- | crates/assists/src/utils.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/assists/src/utils.rs b/crates/assists/src/utils.rs index 8045aac40..cd80c2958 100644 --- a/crates/assists/src/utils.rs +++ b/crates/assists/src/utils.rs | |||
@@ -281,7 +281,7 @@ pub(crate) fn does_pat_match_variant(pat: &ast::Pat, var: &ast::Pat) -> bool { | |||
281 | // FIXME: this partially overlaps with `find_impl_block` | 281 | // FIXME: this partially overlaps with `find_impl_block` |
282 | pub(crate) fn find_struct_impl( | 282 | pub(crate) fn find_struct_impl( |
283 | ctx: &AssistContext, | 283 | ctx: &AssistContext, |
284 | strukt: &ast::AdtDef, | 284 | strukt: &ast::Adt, |
285 | name: &str, | 285 | name: &str, |
286 | ) -> Option<Option<ast::Impl>> { | 286 | ) -> Option<Option<ast::Impl>> { |
287 | let db = ctx.db(); | 287 | let db = ctx.db(); |
@@ -290,9 +290,9 @@ pub(crate) fn find_struct_impl( | |||
290 | })?; | 290 | })?; |
291 | 291 | ||
292 | let struct_def = match strukt { | 292 | let struct_def = match strukt { |
293 | ast::AdtDef::Enum(e) => Adt::Enum(ctx.sema.to_def(e)?), | 293 | ast::Adt::Enum(e) => Adt::Enum(ctx.sema.to_def(e)?), |
294 | ast::AdtDef::Struct(s) => Adt::Struct(ctx.sema.to_def(s)?), | 294 | ast::Adt::Struct(s) => Adt::Struct(ctx.sema.to_def(s)?), |
295 | ast::AdtDef::Union(u) => Adt::Union(ctx.sema.to_def(u)?), | 295 | ast::Adt::Union(u) => Adt::Union(ctx.sema.to_def(u)?), |
296 | }; | 296 | }; |
297 | 297 | ||
298 | let block = module.descendants().filter_map(ast::Impl::cast).find_map(|impl_blk| { | 298 | let block = module.descendants().filter_map(ast::Impl::cast).find_map(|impl_blk| { |