style: Use Au::abs.

This commit is contained in:
Emilio Cobos Álvarez 2017-08-18 10:09:09 +02:00
parent 7bf1748c34
commit 6df597b0b8
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 4 additions and 7 deletions

View file

@ -206,11 +206,8 @@ impl ToCss for CalcLengthOrPercentage {
percentage.to_css(dest)?;
dest.write_str(if length < Zero::zero() { " - " } else { " + " })?;
length.abs().to_css(dest)?;
// FIXME(emilio): Au::abs would be nice.
let length = if length < Zero::zero() { -length } else { length };
length.to_css(dest)?;
dest.write_str(")")
}
}