mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
style: Inline some trivial bits.
Bug: 1466963 Reviewed-by: xidorn MozReview-Commit-ID: A219QehiMqZ
This commit is contained in:
parent
255fe05d40
commit
9c51d31b05
2 changed files with 4 additions and 0 deletions
|
@ -8,6 +8,7 @@ use context::QuirksMode;
|
||||||
use gecko_bindings::structs::nsCompatibility;
|
use gecko_bindings::structs::nsCompatibility;
|
||||||
|
|
||||||
impl From<nsCompatibility> for QuirksMode {
|
impl From<nsCompatibility> for QuirksMode {
|
||||||
|
#[inline]
|
||||||
fn from(mode: nsCompatibility) -> QuirksMode {
|
fn from(mode: nsCompatibility) -> QuirksMode {
|
||||||
match mode {
|
match mode {
|
||||||
nsCompatibility::eCompatibility_FullStandards => QuirksMode::NoQuirks,
|
nsCompatibility::eCompatibility_FullStandards => QuirksMode::NoQuirks,
|
||||||
|
|
|
@ -593,18 +593,21 @@ impl NonCustomPropertyId {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<LonghandId> for NonCustomPropertyId {
|
impl From<LonghandId> for NonCustomPropertyId {
|
||||||
|
#[inline]
|
||||||
fn from(id: LonghandId) -> Self {
|
fn from(id: LonghandId) -> Self {
|
||||||
NonCustomPropertyId(id as usize)
|
NonCustomPropertyId(id as usize)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<ShorthandId> for NonCustomPropertyId {
|
impl From<ShorthandId> for NonCustomPropertyId {
|
||||||
|
#[inline]
|
||||||
fn from(id: ShorthandId) -> Self {
|
fn from(id: ShorthandId) -> Self {
|
||||||
NonCustomPropertyId((id as usize) + ${len(data.longhands)})
|
NonCustomPropertyId((id as usize) + ${len(data.longhands)})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<AliasId> for NonCustomPropertyId {
|
impl From<AliasId> for NonCustomPropertyId {
|
||||||
|
#[inline]
|
||||||
fn from(id: AliasId) -> Self {
|
fn from(id: AliasId) -> Self {
|
||||||
NonCustomPropertyId(id as usize + ${len(data.longhands) + len(data.shorthands)})
|
NonCustomPropertyId(id as usize + ${len(data.longhands) + len(data.shorthands)})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue