diff options
Diffstat (limited to 'components')
-rw-r--r-- | components/style/custom_properties.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/components/style/custom_properties.rs b/components/style/custom_properties.rs index c0a540e5b17..05967a8f922 100644 --- a/components/style/custom_properties.rs +++ b/components/style/custom_properties.rs @@ -168,11 +168,7 @@ where return; } self.index.retain(|key| !set.contains(key)); - // XXX It may be better to use retain when we back to use a - // normal hashmap rather than DiagnosticHashMap. - for key in set.iter() { - self.values.remove(key); - } + self.values.retain(|key, _| !set.contains(key)); debug_assert_eq!(self.values.len(), self.index.len()); } } |