diff options
Diffstat (limited to 'components/layout/incremental.rs')
-rw-r--r-- | components/layout/incremental.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/components/layout/incremental.rs b/components/layout/incremental.rs index 6865d037651..9bf4aff2e14 100644 --- a/components/layout/incremental.rs +++ b/components/layout/incremental.rs @@ -49,7 +49,7 @@ bitflags! { } impl TRestyleDamage for RestyleDamage { - fn compute(old: &Option<Arc<ComputedValues>>, new: &ComputedValues) -> RestyleDamage { compute_damage(old, new) } + fn compute(old: Option<&Arc<ComputedValues>>, new: &ComputedValues) -> RestyleDamage { compute_damage(old, new) } /// Returns a bitmask that represents a flow that needs to be rebuilt and reflowed. /// @@ -143,12 +143,11 @@ macro_rules! add_if_not_equal( }) ); -pub fn compute_damage(old: &Option<Arc<ComputedValues>>, new: &ComputedValues) -> RestyleDamage { - let old: &ComputedValues = - match old.as_ref() { - None => return RestyleDamage::rebuild_and_reflow(), - Some(cv) => &**cv, - }; +pub fn compute_damage(old: Option<&Arc<ComputedValues>>, new: &ComputedValues) -> RestyleDamage { + let old: &ComputedValues = match old { + None => return RestyleDamage::rebuild_and_reflow(), + Some(cv) => &**cv, + }; let mut damage = RestyleDamage::empty(); |