From 9c51d31b055b79e22a13303bcb2dc18b5db351d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 4 Jun 2018 21:58:14 +0200 Subject: [PATCH] style: Inline some trivial bits. Bug: 1466963 Reviewed-by: xidorn MozReview-Commit-ID: A219QehiMqZ --- components/style/gecko_bindings/sugar/ns_compatibility.rs | 1 + components/style/properties/properties.mako.rs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/components/style/gecko_bindings/sugar/ns_compatibility.rs b/components/style/gecko_bindings/sugar/ns_compatibility.rs index 3fe63391d36..eaf97ca6f31 100644 --- a/components/style/gecko_bindings/sugar/ns_compatibility.rs +++ b/components/style/gecko_bindings/sugar/ns_compatibility.rs @@ -8,6 +8,7 @@ use context::QuirksMode; use gecko_bindings::structs::nsCompatibility; impl From for QuirksMode { + #[inline] fn from(mode: nsCompatibility) -> QuirksMode { match mode { nsCompatibility::eCompatibility_FullStandards => QuirksMode::NoQuirks, diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index 5133cd6ae2d..4e52412c18d 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -593,18 +593,21 @@ impl NonCustomPropertyId { } impl From for NonCustomPropertyId { + #[inline] fn from(id: LonghandId) -> Self { NonCustomPropertyId(id as usize) } } impl From for NonCustomPropertyId { + #[inline] fn from(id: ShorthandId) -> Self { NonCustomPropertyId((id as usize) + ${len(data.longhands)}) } } impl From for NonCustomPropertyId { + #[inline] fn from(id: AliasId) -> Self { NonCustomPropertyId(id as usize + ${len(data.longhands) + len(data.shorthands)}) }