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