Bug 1466963: Inline some trivial bits. r=xidorn

MozReview-Commit-ID: A219QehiMqZ
This commit is contained in:
Emilio Cobos Álvarez 2018-06-04 21:58:14 +02:00
Родитель 1cda6f4992
Коммит c133e05b01
2 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -8,6 +8,7 @@ use context::QuirksMode;
use gecko_bindings::structs::nsCompatibility;
impl From<nsCompatibility> for QuirksMode {
#[inline]
fn from(mode: nsCompatibility) -> QuirksMode {
match mode {
nsCompatibility::eCompatibility_FullStandards => QuirksMode::NoQuirks,

Просмотреть файл

@ -593,18 +593,21 @@ impl NonCustomPropertyId {
}
impl From<LonghandId> for NonCustomPropertyId {
#[inline]
fn from(id: LonghandId) -> Self {
NonCustomPropertyId(id as usize)
}
}
impl From<ShorthandId> for NonCustomPropertyId {
#[inline]
fn from(id: ShorthandId) -> Self {
NonCustomPropertyId((id as usize) + ${len(data.longhands)})
}
}
impl From<AliasId> for NonCustomPropertyId {
#[inline]
fn from(id: AliasId) -> Self {
NonCustomPropertyId(id as usize + ${len(data.longhands) + len(data.shorthands)})
}