We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
Meta
The text was updated successfully, but these errors were encountered:
Wrap long array and slice patterns.
f27349a
Closes rust-lang#4530.
cd09303
3e28fe4
7607d16
f0f449d
Closes #4530.
topecongiro
Successfully merging a pull request may close this issue.
It seems that rustfmt doesn't wrap long slice pattern lines.
Input
Output
Expected output
Meta
The text was updated successfully, but these errors were encountered: