From 9b74dd0c04651eb22e743c6ffc91c11bb3df87d8 Mon Sep 17 00:00:00 2001 From: Joshua Warner Date: Sat, 5 Jun 2021 17:09:56 -0700 Subject: fmt --- .../src/handlers/convert_tuple_struct_to_named_struct.rs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'crates') diff --git a/crates/ide_assists/src/handlers/convert_tuple_struct_to_named_struct.rs b/crates/ide_assists/src/handlers/convert_tuple_struct_to_named_struct.rs index 53709e31f..fc5a17f05 100644 --- a/crates/ide_assists/src/handlers/convert_tuple_struct_to_named_struct.rs +++ b/crates/ide_assists/src/handlers/convert_tuple_struct_to_named_struct.rs @@ -97,10 +97,16 @@ fn edit_struct_def( if let Either::Left(strukt) = strukt { if let Some(w) = strukt.where_clause() { edit.delete(w.syntax().text_range()); - edit.insert(tuple_fields_text_range.start(), ast::make::tokens::single_newline().text()); + edit.insert( + tuple_fields_text_range.start(), + ast::make::tokens::single_newline().text(), + ); edit.insert(tuple_fields_text_range.start(), w.syntax().text()); edit.insert(tuple_fields_text_range.start(), ","); - edit.insert(tuple_fields_text_range.start(), ast::make::tokens::single_newline().text()); + edit.insert( + tuple_fields_text_range.start(), + ast::make::tokens::single_newline().text(), + ); } else { edit.insert(tuple_fields_text_range.start(), ast::make::tokens::single_space().text()); } @@ -534,7 +540,10 @@ where convert_tuple_struct_to_named_struct, r#"enum Enum { Variant$0 { value: usize } };"#, ); - check_assist_not_applicable(convert_tuple_struct_to_named_struct, r#"enum Enum { Variant$0 }"#); + check_assist_not_applicable( + convert_tuple_struct_to_named_struct, + r#"enum Enum { Variant$0 }"#, + ); } #[test] -- cgit v1.2.3