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:
Emilio Cobos Álvarez 2019-05-16 23:21:37 +00:00
parent b61eb84d96
commit ab8776a144
9 changed files with 100 additions and 107 deletions

View file

@ -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()
}
}