Skip to content

Feature request: match_arm_align_threshold #5197

New issue

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

Closed
cehteh opened this issue Jan 27, 2022 · 1 comment
Closed

Feature request: match_arm_align_threshold #5197

cehteh opened this issue Jan 27, 2022 · 1 comment

Comments

@cehteh
Copy link

cehteh commented Jan 27, 2022

Since we already have:

enum_discrim_align_threshold
struct_field_align_threshold

It would be nice to have a similar formatter for simple/one-line match arms that lines up the '=>' like:

match foo {
    Some(LongEntityName(name))  => 1,
    Some(Short(thing))          => 2,
    Some(_)                     => 3,
    None                        => 4,
}
@calebcartwright
Copy link
Member

calebcartwright commented Jan 29, 2022

Closing as a duplicate of #894 (though I'll add that i think your proposal is probably as good a solution as any 👍)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants