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 upFix 9283 - space or comma separated rect() arguments #11495
Conversation
highfive
commented
May 29, 2016
|
Heads up! This PR modifies the following files:
|
highfive
commented
May 29, 2016
|
r=me modulo this one nit. -S-awaiting-review +S-needs-code-changes
|
385cc6d
to
aafac46
highfive
commented
May 30, 2016
|
New code was committed to pull request. |
|
@bors-servo r+
|
|
|
Fix 9283 - space or comma separated rect() arguments <!-- Please describe your changes on the following line: --> Allow either commas or space to separate `rect()` arguments, but not both. Don't allocate unnecessary `Vec` --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #9283 <!-- Either: --> - [X] There are tests for these changes OR <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/11495) <!-- Reviewable:end -->
| if input.try(|input| input.expect_ident_matching("auto")).is_ok() { | ||
| return Ok(SpecifiedValue(None)) | ||
| } | ||
| if !try!(input.expect_function()).eq_ignore_ascii_case("rect") { | ||
| return Err(()) | ||
| } | ||
| let sides = try!(input.parse_nested_block(|input| { |
This comment has been minimized.
This comment has been minimized.
SimonSapin
May 30, 2016
Member
parse_nested_block is still needed. Without it, you’re ignoring the stuff between rect( and ), and then parsing four arguments that come after the function.
To fix this, move the rest of this function (from let top = …; to Ok(…)) into a
try!(input.parse_nested_block(|input| {
// …
}))`block.
|
@bors-servo r- Oops. |
|
|
highfive
commented
May 30, 2016
|
|
Thanks for the tip, totally missed that! I don't think I need the |
aafac46
to
41d2670
highfive
commented
May 30, 2016
|
New code was committed to pull request. |
|
Yes, good point about @bors-servo r+ |
|
|
Fix 9283 - space or comma separated rect() arguments <!-- Please describe your changes on the following line: --> Allow either commas or space to separate `rect()` arguments, but not both. Don't allocate unnecessary `Vec` --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #9283 <!-- Either: --> - [X] There are tests for these changes OR <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/11495) <!-- Reviewable:end -->
|
|
mitchhentges commentedMay 29, 2016
•
edited by larsbergstrom
Allow either commas or space to separate
rect()arguments, but not both. Don't allocate unnecessaryVec./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is