Repository navigation
Format parts of layout - #19681
Merged
Merged
Format parts of layout#19681
Conversation
Formats the following files: * components/layout/display_list_builder.rs * components/layout/webrender_helpers.rs Remove outdated options from rustfmt.toml. Configure rustfmt to place binary operators at the end of line (to match ./mach test-tidy).
|
Heads up! This PR modifies the following files:
|
pyfisch
commented
Jan 3, 2018
| GenericFilter::Grayscale(amount) => result.push(webrender_api::FilterOp::Grayscale(amount.0)), | ||
| GenericFilter::HueRotate(angle) => result.push(webrender_api::FilterOp::HueRotate(angle.radians())), | ||
| GenericFilter::Invert(amount) => result.push(webrender_api::FilterOp::Invert(amount.0)), | ||
| GenericFilter::Blur(radius) => { |
Contributor
Author
There was a problem hiding this comment.
The formatting here is a bit wasteful but this can be changed by removing the GenericFilter:: and webrender_api:: prefixes.
Member
|
I am fine with running rustfmt on individual files at a time like this. |
Member
|
Looks fine to me too. Specially this file, which is one of the oldest, and has grown organically a lot. |
emilio
approved these changes
Jan 4, 2018
Member
|
@bors-servo r+ Checked with some people on IRC: |
Contributor
|
📌 Commit 83bce46 has been approved by |
Contributor
bors-servo
pushed a commit
that referenced
this pull request
Jan 4, 2018
Format parts of layout Formats the following files: * components/layout/display_list_builder.rs * components/layout/webrender_helpers.rs Remove outdated options from rustfmt.toml. Configure rustfmt to place binary operators at the end of line (to match ./mach test-tidy). Rationale: I am tired of indenting my patches by hand trying my best to do it correctly and match the surrounding code. Just to be told that either my indentation is wrong or that I should switch to block indentation for this function because it looks better. The new formatting passes `./mach test-tidy`. Compared to the old formatting it is a lot more consistent but also tends to spread the code across more lines. The diff is this big because a lot of code used visual indentation. See also #8553 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19681) <!-- Reviewable:end -->
Contributor
|
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev |
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.
Formats the following files:
Remove outdated options from rustfmt.toml.
Configure rustfmt to place binary operators
at the end of line (to match ./mach test-tidy).
Rationale: I am tired of indenting my patches by hand trying my best to do it correctly and match the surrounding code. Just to be told that either my indentation is wrong or that I should switch to block indentation for this function because it looks better.
The new formatting passes
./mach test-tidy. Compared to the old formatting it is a lot more consistent but also tends to spread the code across more lines. The diff is this big because a lot of code used visual indentation.See also #8553
This change is