Bug 1930789 Part 1 - Use boxed slice in PrioritizedPropertyIter rather than a Vec. r=firefox-style-system-reviewers,emilio

Differential Revision: https://phabricator.services.mozilla.com/D228745
This commit is contained in:
Emily McDonough 2024-11-13 22:48:38 +00:00
parent a18cc328fe
commit b3269d42b3

View File

@ -6348,7 +6348,7 @@ struct PropertyAndIndex {
struct PrioritizedPropertyIter<'a> {
properties: &'a [PropertyValuePair],
sorted_property_indices: Vec<PropertyAndIndex>,
sorted_property_indices: Box<[PropertyAndIndex]>,
curr: usize,
}
@ -6359,7 +6359,7 @@ impl<'a> PrioritizedPropertyIter<'a> {
// If we fail to convert a nsCSSPropertyID into a PropertyId we
// shouldn't fail outright but instead by treating that property as the
// 'all' property we make it sort last.
let mut sorted_property_indices: Vec<PropertyAndIndex> = properties
let mut sorted_property_indices: Box<[PropertyAndIndex]> = properties
.iter()
.enumerate()
.map(|(index, pair)| {