diff options
author | Dmitry <[email protected]> | 2020-08-09 14:35:51 +0100 |
---|---|---|
committer | Dmitry <[email protected]> | 2020-08-09 14:39:32 +0100 |
commit | 8068302fefc75440b823f4bf1731a5f347d7c767 (patch) | |
tree | 251b967182e79bc82a58c2fb208c688f6152df1f /crates/ra_assists/src/handlers/extract_struct_from_enum_variant.rs | |
parent | 1a43a0f63e0008787225abb6fb2baef97b6a39e0 (diff) | |
parent | 8a57afe5a4bfab40072a83f7dc4ca560bf860919 (diff) |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'crates/ra_assists/src/handlers/extract_struct_from_enum_variant.rs')
-rw-r--r-- | crates/ra_assists/src/handlers/extract_struct_from_enum_variant.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_assists/src/handlers/extract_struct_from_enum_variant.rs b/crates/ra_assists/src/handlers/extract_struct_from_enum_variant.rs index 2b8e273b3..ccec688ca 100644 --- a/crates/ra_assists/src/handlers/extract_struct_from_enum_variant.rs +++ b/crates/ra_assists/src/handlers/extract_struct_from_enum_variant.rs | |||
@@ -31,7 +31,7 @@ pub(crate) fn extract_struct_from_enum_variant( | |||
31 | acc: &mut Assists, | 31 | acc: &mut Assists, |
32 | ctx: &AssistContext, | 32 | ctx: &AssistContext, |
33 | ) -> Option<()> { | 33 | ) -> Option<()> { |
34 | let variant = ctx.find_node_at_offset::<ast::EnumVariant>()?; | 34 | let variant = ctx.find_node_at_offset::<ast::Variant>()?; |
35 | let field_list = match variant.kind() { | 35 | let field_list = match variant.kind() { |
36 | ast::StructKind::Tuple(field_list) => field_list, | 36 | ast::StructKind::Tuple(field_list) => field_list, |
37 | _ => return None, | 37 | _ => return None, |