Closed
Conversation
Member
|
I would prefer this to be blocked until after the 0.15 is released, as it has high chances of conflicts during cherry picks. |
Contributor
|
This turns lines that were already above 100 to be even longer. I don't see this as a win at all. Especially the one with long strings that put all the parameters on the same already way too long line. I'm pretty sure a bunch of those are bugs in rustfmt where it just gives up when lines are super long because of a string. |
IceSentry
reviewed
Oct 26, 2024
IceSentry
reviewed
Oct 26, 2024
crates/bevy_core_pipeline/src/core_3d/main_opaque_pass_3d_node.rs
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
Format the code optimally. This helps avoid conflicts and unnecessary changes.
For example, when trying to use Find & Replace to make code changes, formatting everything on 1 line makes it simpler. After the Find & Replace operations, formatting can be returned back to normal. This is what I did in #16112.
Solution
rustfmt.tomlsetmax_width = 9999.cargo fmt --all.max_width. (sets it back to100)cargo fmt --all.I consider this to be a workaround to a bug in rustfmt where the resulting formatted code depends on how it was formatted beforehand.
Testing
CI