-
Notifications
You must be signed in to change notification settings - Fork 892
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
Fix #5662 #5724
base: master
Are you sure you want to change the base?
Fix #5662 #5724
Conversation
@xldenis Thanks for the PR and your first contribution to rustfmt 🎉! Really quick, can you double check the issue that you're linking to. The one you've linked to is already closed, and seems unrelated.When you update the issue description can you please link this PR to the issue so that the issue could be closed if this gets merged. |
oops I mean #5662 |
@xldenis thanks for clarifying. Could you also amend your commit message. |
I don't know if you noticed, but I fixed the commit message. |
@xldenis Thanks for making the update to the commit message! I'll try to set aside some time to review this within the next week or so. |
There's no rush :) |
👋 any change of getting a review soon? |
To be fully transparent, probably not. As a team currently consisting of only two volunteers we are enormously pressed for time, and we've a mountain of work that's really core and part of rustfmt's primary scope. While some parallel efforts are in flight to create some PR review capacity, I think it's highly unlikely that we'll be able to spend any cycles on things like adding new config options. I appreciate that's not the answer you were hoping for, but I'd rather answer with a disappointing response over not answering at all. |
No worries! The branch is finished, I'll rebase it if needed whenever it does get reviewed :) |
Implements #5662 by adding a new unstable option
enum_variant_layout
.enum_variant_layout = "Compressed"
, we no longer reformat the entire enum if a single variant exceeds the allowed line width. Additionally, we don't take into account the size of attributes or doc-comments when making that determination.enum_variant_layout = "Tall"
, we perform the existing layout logic: if a single variant would need multiple lines, then format the whole enum to use multiple lines.enum_variant_layout = "Vertical"
, we always format variants using multiple lines.Fixes #5662