-
Notifications
You must be signed in to change notification settings - Fork 971
Closed
Labels
I-poor-formattingIssue: poor formattingIssue: poor formatting
Description
It seems that rustfmt doesn't wrap long slice pattern lines.
Input
enum Foo {
IAmALongVariantNameIJustKeepGoingOn { a: usize, b: usize },
}
fn main() {
let foos = vec![Foo::IAmALongVariantNameIJustKeepGoingOn { a: 0, b: 0 }];
match foos.as_slice() {
[
Foo::IAmALongVariantNameIJustKeepGoingOn { a: 0, b: 0 },
Foo::IAmALongVariantNameIJustKeepGoingOn { a: 0, b: 0 },
Foo::IAmALongVariantNameIJustKeepGoingOn { a: 0, b: 0 },
] => {}
_ => {}
}
}Output
enum Foo {
IAmALongVariantNameIJustKeepGoingOn { a: usize, b: usize },
}
fn main() {
let foos = vec![Foo::IAmALongVariantNameIJustKeepGoingOn { a: 0, b: 0 }];
match foos.as_slice() {
[Foo::IAmALongVariantNameIJustKeepGoingOn { a: 0, b: 0 }, Foo::IAmALongVariantNameIJustKeepGoingOn { a: 0, b: 0 }, Foo::IAmALongVariantNameIJustKeepGoingOn { a: 0, b: 0 }] =>
{}
_ => {}
}
}Expected output
enum Foo {
IAmALongVariantNameIJustKeepGoingOn { a: usize, b: usize },
}
fn main() {
let foos = vec![Foo::IAmALongVariantNameIJustKeepGoingOn { a: 0, b: 0 }];
match foos.as_slice() {
[
Foo::IAmALongVariantNameIJustKeepGoingOn { a: 0, b: 0 },
Foo::IAmALongVariantNameIJustKeepGoingOn { a: 0, b: 0 },
Foo::IAmALongVariantNameIJustKeepGoingOn { a: 0, b: 0 },
] => {}
_ => {}
}
}Meta
Metadata
Metadata
Assignees
Labels
I-poor-formattingIssue: poor formattingIssue: poor formatting