Skip to content

Commit 9b74dd0

Browse files
fmt
1 parent 18f796a commit 9b74dd0

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

crates/ide_assists/src/handlers/convert_tuple_struct_to_named_struct.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,16 @@ fn edit_struct_def(
9797
if let Either::Left(strukt) = strukt {
9898
if let Some(w) = strukt.where_clause() {
9999
edit.delete(w.syntax().text_range());
100-
edit.insert(tuple_fields_text_range.start(), ast::make::tokens::single_newline().text());
100+
edit.insert(
101+
tuple_fields_text_range.start(),
102+
ast::make::tokens::single_newline().text(),
103+
);
101104
edit.insert(tuple_fields_text_range.start(), w.syntax().text());
102105
edit.insert(tuple_fields_text_range.start(), ",");
103-
edit.insert(tuple_fields_text_range.start(), ast::make::tokens::single_newline().text());
106+
edit.insert(
107+
tuple_fields_text_range.start(),
108+
ast::make::tokens::single_newline().text(),
109+
);
104110
} else {
105111
edit.insert(tuple_fields_text_range.start(), ast::make::tokens::single_space().text());
106112
}
@@ -534,7 +540,10 @@ where
534540
convert_tuple_struct_to_named_struct,
535541
r#"enum Enum { Variant$0 { value: usize } };"#,
536542
);
537-
check_assist_not_applicable(convert_tuple_struct_to_named_struct, r#"enum Enum { Variant$0 }"#);
543+
check_assist_not_applicable(
544+
convert_tuple_struct_to_named_struct,
545+
r#"enum Enum { Variant$0 }"#,
546+
);
538547
}
539548

540549
#[test]

0 commit comments

Comments
 (0)