Fix future illegal_floating_point_literal_pattern warnings.

They make component/style fail to build, because of `#[deny(warnings)]`
This commit is contained in:
Simon Sapin 2017-05-12 16:12:17 +02:00
parent 58253f545b
commit 8c9e5d9f9d
4 changed files with 23 additions and 19 deletions

View file

@ -375,7 +375,7 @@ impl ::std::ops::Deref for AttrValue {
pub fn parse_nonzero_length(value: &str) -> LengthOrPercentageOrAuto {
match parse_length(value) {
LengthOrPercentageOrAuto::Length(x) if x == Au::zero() => LengthOrPercentageOrAuto::Auto,
LengthOrPercentageOrAuto::Percentage(0.) => LengthOrPercentageOrAuto::Auto,
LengthOrPercentageOrAuto::Percentage(x) if x == 0. => LengthOrPercentageOrAuto::Auto,
x => x,
}
}