mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Merge pull request #4825 from Adenilson/usingColorOperators01
Using Color equality operators to streamline code
This commit is contained in:
commit
728f723753
2 changed files with 3 additions and 8 deletions
|
@ -678,10 +678,7 @@ impl LayoutTask {
|
|||
};
|
||||
|
||||
let black = color::black();
|
||||
// TODO: Use equality operators when we sync with rust-azure.
|
||||
if element_bg_color.r != black.r || element_bg_color.g != black.g ||
|
||||
element_bg_color.b != black.b || element_bg_color.a != black.a {
|
||||
|
||||
if element_bg_color != black {
|
||||
color = element_bg_color;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue