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 upSupport plain number-typed properties in geckolib #10957
Conversation
highfive
commented
May 2, 2016
|
Heads up! This PR modifies the following files:
|
highfive
commented
May 2, 2016
| fn parse_with_minimum(input: &mut Parser, min: CSSFloat) -> Result<Number, ()> { | ||
| match parse_number(input) { | ||
| Ok(value) if value < min => Err(()), | ||
| value => value.map(Number), |
This comment has been minimized.
This comment has been minimized.
bholley
May 2, 2016
Contributor
Using a newtype as a function in this way seems a bit weird, but maybe it's a totally acceptable pattern. Can you verify that this is acceptable Rust? (No need to block landing on it)
This comment has been minimized.
This comment has been minimized.
heycam
May 2, 2016
Author
Member
There are a couple of other similar uses in this file – mapping to Au and Percentage – and a bunch more mapping to enum constructors, which is not so different.
|
Nice! @bors-servo r=bholley Don't forget to update the spreadsheet! |
|
|
|
Oh wait, tidy problem. @bor-servo r- |
|
@bors-servo delegate+ I'd recommend running ./mach test-tidy before pushing PRs. |
|
|
Support plain number-typed properties in geckolib r? @bholley <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10957) <!-- Reviewable:end -->
|
|
|
@bors-servo r=bholley |
|
|
Support plain number-typed properties in geckolib r? @bholley <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10957) <!-- Reviewable:end -->
|
|
highfive
commented
May 3, 2016
|
|
@bors-servo retry |
|
|
|
|
Support color-typed properties in geckolib This is on top of #10957 though I'm not sure how to make that PR's commits not appear in this one. r? @bholley <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10959) <!-- Reviewable:end -->
Support color-typed properties in geckolib This is on top of #10957 though I'm not sure how to make that PR's commits not appear in this one. r? @bholley <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10959) <!-- Reviewable:end -->
Support color-typed properties in geckolib This is on top of #10957 though I'm not sure how to make that PR's commits not appear in this one. r? @bholley <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10959) <!-- Reviewable:end -->
…m heycam:color); r=bholley This is on top of servo/servo#10957 though I'm not sure how to make that PR's commits not appear in this one. r? bholley Source-Repo: https://github.com/servo/servo Source-Revision: 1a1ea30f8c36a5dd01717fbf2294707f5d78c377 UltraBlame original commit: 36634609ea90b79d84ab07a959df7644a8f40d37
…m heycam:color); r=bholley This is on top of servo/servo#10957 though I'm not sure how to make that PR's commits not appear in this one. r? bholley Source-Repo: https://github.com/servo/servo Source-Revision: 1a1ea30f8c36a5dd01717fbf2294707f5d78c377 UltraBlame original commit: 36634609ea90b79d84ab07a959df7644a8f40d37
…m heycam:color); r=bholley This is on top of servo/servo#10957 though I'm not sure how to make that PR's commits not appear in this one. r? bholley Source-Repo: https://github.com/servo/servo Source-Revision: 1a1ea30f8c36a5dd01717fbf2294707f5d78c377 UltraBlame original commit: 36634609ea90b79d84ab07a959df7644a8f40d37
heycam commentedMay 2, 2016
•
edited by larsbergstrom
r? @bholley
This change is