Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFormat parts of layout #19681
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).
highfive
commented
Jan 3, 2018
|
Heads up! This PR modifies the following files:
|
highfive
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) => { |
This comment has been minimized.
This comment has been minimized.
pyfisch
Jan 3, 2018
Author
Contributor
The formatting here is a bit wasteful but this can be changed by removing the GenericFilter:: and webrender_api:: prefixes.
|
I am fine with running rustfmt on individual files at a time like this. |
|
Looks fine to me too. Specially this file, which is one of the oldest, and has grown organically a lot. |
|
@bors-servo r+ Checked with some people on IRC:
|
|
|
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 -->
|
|
pyfisch commentedJan 3, 2018
•
edited by SimonSapin
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