Fix illegal_floating_point_literal_pattern again and rustup…

… to compiler that has it, to avoid regressing again.
This commit is contained in:
Simon Sapin 2017-05-13 14:23:25 +02:00
parent d2fa2ae934
commit dd38c0969d
3 changed files with 6 additions and 9 deletions

View file

@ -1660,11 +1660,7 @@ fn static_assert() {
pub fn clone_font_size_adjust(&self) -> longhands::font_size_adjust::computed_value::T {
use properties::longhands::font_size_adjust::computed_value::T;
match self.gecko.mFont.sizeAdjust {
-1.0 => T::None,
_ => T::Number(self.gecko.mFont.sizeAdjust),
}
T::from_gecko_adjust(self.gecko.mFont.sizeAdjust)
}
#[allow(non_snake_case)]

View file

@ -1064,9 +1064,10 @@ ${helpers.single_keyword_system("font-variant-caps",
impl T {
pub fn from_gecko_adjust(gecko: f32) -> Self {
match gecko {
-1.0 => T::None,
_ => T::Number(gecko),
if gecko == -1.0 {
T::None
} else {
T::Number(gecko)
}
}
}

View file

@ -1 +1 @@
ced823e267c132fab172b1890b24073995e79ffa
e17a1227ac779a181b2839998e26a7e4e434c2a0