mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +01:00
Make PropertyDeclaration::id and AnimationValue::id inline
This commit is contained in:
parent
921d1aeeba
commit
57daf06c71
2 changed files with 2 additions and 0 deletions
|
@ -363,6 +363,7 @@ pub enum AnimationValue {
|
|||
|
||||
impl AnimationValue {
|
||||
/// Returns the longhand id this animated value corresponds to.
|
||||
#[inline]
|
||||
pub fn id(&self) -> LonghandId {
|
||||
let id = unsafe { *(self as *const _ as *const LonghandId) };
|
||||
debug_assert_eq!(id, match *self {
|
||||
|
|
|
@ -1739,6 +1739,7 @@ impl fmt::Debug for PropertyDeclaration {
|
|||
|
||||
impl PropertyDeclaration {
|
||||
/// Given a property declaration, return the property declaration id.
|
||||
#[inline]
|
||||
pub fn id(&self) -> PropertyDeclarationId {
|
||||
match *self {
|
||||
PropertyDeclaration::Custom(ref declaration) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue