Auto merge of #17745 - SergeevPavel:cleanup, r=emilio

rustify if statements style

<!-- Please describe your changes on the following line: -->
Rewrite if statement in more rusty style.

---
<!-- 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 #17699 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17745)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-07-15 14:07:19 -07:00 committed by GitHub
commit 98836ff30d

View file

@ -164,11 +164,19 @@ ${helpers.single_keyword("image-rendering",
// match Gecko's behavior when it was correct.
rounded_angle = rounded_angle + TWO_PI;
}
if rounded_angle < 0.25 * PI { Orientation::Angle0 }
else if rounded_angle < 0.75 * PI { Orientation::Angle90 }
else if rounded_angle < 1.25 * PI { Orientation::Angle180 }
else if rounded_angle < 1.75 * PI { Orientation::Angle270 }
else { Orientation::Angle0 }
if rounded_angle < 0.25 * PI {
return Orientation::Angle0
}
if rounded_angle < 0.75 * PI {
return Orientation::Angle90
}
if rounded_angle < 1.25 * PI {
return Orientation::Angle180
}
if rounded_angle < 1.75 * PI {
return Orientation::Angle270
}
Orientation::Angle0
}
impl ToComputedValue for SpecifiedValue {