mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Use OwnedSlice in the specified and computed values of most vector properties.
This is just a refactor in the right direction. Eventual goal is: * All inherited properties use ArcSlice<>. * All reset properties use OwnedSlice<> (or ThinVec<>). No conversion happens at all, so we can remove all that glue, and also compute_iter and co. Of course there's work to do, but this is a step towards that. Differential Revision: https://phabricator.services.mozilla.com/D30127
This commit is contained in:
parent
b61eb84d96
commit
ab8776a144
9 changed files with 100 additions and 107 deletions
|
@ -454,8 +454,7 @@ where
|
|||
fn to_computed_value(&self, context: &Context) -> Self::ComputedValue {
|
||||
self.iter()
|
||||
.map(|item| item.to_computed_value(context))
|
||||
.collect::<Vec<_>>()
|
||||
.into()
|
||||
.collect()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
@ -463,8 +462,7 @@ where
|
|||
computed
|
||||
.iter()
|
||||
.map(T::from_computed_value)
|
||||
.collect::<Vec<_>>()
|
||||
.into()
|
||||
.collect()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue