diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-06-08 17:28:48 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-06-08 17:28:48 +0100 |
commit | 3a7c218fd40c77246c94d28b36b1c567492e5bcb (patch) | |
tree | e3408f17dca2872e79e5b76caad89e9722ed47d8 /crates/ra_assists/src/lib.rs | |
parent | 38ac331f7dea94581ec687167c92c65b10daf38d (diff) | |
parent | 5dda9955380c6214aa5720ad640b76b870aaa556 (diff) |
Merge #4576
4576: Add implementation of extract struct from enum variant r=matklad a=mcrakhman
Hi guys! I implemented the extraction functionality including modifying multiple files. The only thing I didn't change the cursor position. I've done it with a previous API, but now snippets have been introduced and I need to figure out how to do it.
Please bear in mind that I am a newcomer in the rust-analyzer (and also Rust) world, so I tried to implement the feature to the best of my knowledge, but the API is very new to me, so I am very welcome to introducing changes etc.
Co-authored-by: Mikhail Rakhmanov <[email protected]>
Diffstat (limited to 'crates/ra_assists/src/lib.rs')
-rw-r--r-- | crates/ra_assists/src/lib.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/ra_assists/src/lib.rs b/crates/ra_assists/src/lib.rs index fb5d59a87..185428bd5 100644 --- a/crates/ra_assists/src/lib.rs +++ b/crates/ra_assists/src/lib.rs | |||
@@ -115,6 +115,7 @@ mod handlers { | |||
115 | mod change_return_type_to_result; | 115 | mod change_return_type_to_result; |
116 | mod change_visibility; | 116 | mod change_visibility; |
117 | mod early_return; | 117 | mod early_return; |
118 | mod extract_struct_from_enum_variant; | ||
118 | mod fill_match_arms; | 119 | mod fill_match_arms; |
119 | mod fix_visibility; | 120 | mod fix_visibility; |
120 | mod flip_binexpr; | 121 | mod flip_binexpr; |
@@ -155,6 +156,7 @@ mod handlers { | |||
155 | change_return_type_to_result::change_return_type_to_result, | 156 | change_return_type_to_result::change_return_type_to_result, |
156 | change_visibility::change_visibility, | 157 | change_visibility::change_visibility, |
157 | early_return::convert_to_guarded_return, | 158 | early_return::convert_to_guarded_return, |
159 | extract_struct_from_enum_variant::extract_struct_from_enum_variant, | ||
158 | fill_match_arms::fill_match_arms, | 160 | fill_match_arms::fill_match_arms, |
159 | fix_visibility::fix_visibility, | 161 | fix_visibility::fix_visibility, |
160 | flip_binexpr::flip_binexpr, | 162 | flip_binexpr::flip_binexpr, |