diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2017-05-13 14:23:25 +0200 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2017-05-13 14:23:25 +0200 |
commit | dd38c0969da04ff93b819cdc1d993bd67198bb65 (patch) | |
tree | 9d2d5932d9f4c1e792d5d2e38d304cc05508c4cd | |
parent | d2fa2ae9343db8d958570a501ff9a7b7a203ceeb (diff) | |
download | servo-dd38c0969da04ff93b819cdc1d993bd67198bb65.tar.gz servo-dd38c0969da04ff93b819cdc1d993bd67198bb65.zip |
Fix illegal_floating_point_literal_pattern again and rustup…
… to compiler that has it, to avoid regressing again.
-rw-r--r-- | components/style/properties/gecko.mako.rs | 6 | ||||
-rw-r--r-- | components/style/properties/longhand/font.mako.rs | 7 | ||||
-rw-r--r-- | rust-commit-hash | 2 |
3 files changed, 6 insertions, 9 deletions
diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index 4271b424bf1..60acde9e18b 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -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)] diff --git a/components/style/properties/longhand/font.mako.rs b/components/style/properties/longhand/font.mako.rs index 6691603499f..86f4666b322 100644 --- a/components/style/properties/longhand/font.mako.rs +++ b/components/style/properties/longhand/font.mako.rs @@ -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) } } } diff --git a/rust-commit-hash b/rust-commit-hash index 15a99fcc6bd..22a3daa7544 100644 --- a/rust-commit-hash +++ b/rust-commit-hash @@ -1 +1 @@ -ced823e267c132fab172b1890b24073995e79ffa +e17a1227ac779a181b2839998e26a7e4e434c2a0 |