mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
refactor: use is_zero() instead of comparing with Au::Zero() (#36347)
Use `is_zero()` instead of comparing with `Au::Zero()` for zero checks. Testing: This change does not cause behaviour change, a test is not necessary. Fixes: #36300 --------- Signed-off-by: Barigbue <barigbuenbira@gmail.com>
This commit is contained in:
parent
2fe57cc2a2
commit
a0730d7154
7 changed files with 16 additions and 14 deletions
|
@ -960,7 +960,7 @@ impl<'a> TableLayout<'a> {
|
|||
.clone()
|
||||
.map(max_content_sum)
|
||||
.fold(Au::zero(), |a, b| a + b);
|
||||
if total_max_content_width != Au::zero() {
|
||||
if !total_max_content_width.is_zero() {
|
||||
for column_index in unconstrained_max_content_columns {
|
||||
column_sizes[column_index] += extra_inline_size.scale_by(
|
||||
columns[column_index].content_sizes.max_content.to_f32_px() /
|
||||
|
@ -1005,7 +1005,7 @@ impl<'a> TableLayout<'a> {
|
|||
.clone()
|
||||
.map(max_content_sum)
|
||||
.fold(Au::zero(), |a, b| a + b);
|
||||
if total_max_content_width != Au::zero() {
|
||||
if !total_max_content_width.is_zero() {
|
||||
for column_index in constrained_max_content_columns {
|
||||
column_sizes[column_index] += extra_inline_size.scale_by(
|
||||
columns[column_index].content_sizes.max_content.to_f32_px() /
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue