Add more tests for struct_field_align_threshold and trailing_comma

This commit is contained in:
cassaundra 2022-01-14 17:25:46 -08:00 committed by Caleb Cartwright
parent ee130515e3
commit ab9f2a8ac7
5 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,14 @@
// rustfmt-struct_field_align_threshold: 30
// rustfmt-trailing_comma: Always
struct Foo {
group_a: u8,
group_b: u8
}
struct Bar {
group_a: u8,
group_b: u8,
}

View File

@ -0,0 +1,8 @@
// rustfmt-struct_field_align_threshold: 0
// rustfmt-trailing_comma: Never
pub struct Baz {
group_a: u8,
group_b: u8
}

View File

@ -0,0 +1,14 @@
// rustfmt-struct_field_align_threshold: 30
// rustfmt-trailing_comma: Always
struct Foo {
group_a: u8,
group_b: u8,
}
struct Bar {
group_a: u8,
group_b: u8,
}