aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_assists/src/handlers/extract_struct_from_enum_variant.rs3
1 files changed, 1 insertions, 2 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 d5397bf21..dd2fd57a7 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
@@ -127,12 +127,12 @@ fn extract_struct_def(
127 } else { 127 } else {
128 "".to_string() 128 "".to_string()
129 }; 129 };
130 let mut buf = String::new();
131 let indent = if let Some(indent) = leading_indent(enum_ast) { 130 let indent = if let Some(indent) = leading_indent(enum_ast) {
132 indent.to_string() 131 indent.to_string()
133 } else { 132 } else {
134 "".to_string() 133 "".to_string()
135 }; 134 };
135 let mut buf = String::new();
136 136
137 format_to!( 137 format_to!(
138 buf, 138 buf,
@@ -161,7 +161,6 @@ fn update_variant(
161 list_range.end().checked_sub(TextSize::from(1))?, 161 list_range.end().checked_sub(TextSize::from(1))?,
162 ); 162 );
163 edit.perform(file_id, |builder| { 163 edit.perform(file_id, |builder| {
164 builder.set_file(file_id);
165 builder.replace(inside_variant_range, variant_name); 164 builder.replace(inside_variant_range, variant_name);
166 }); 165 });
167 Some(()) 166 Some(())