From 5117b7ec5aba67e7d342287f1e6bf6313349ed43 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Tue, 31 Jan 2017 16:43:57 -0800 Subject: [PATCH] Preallocate in deduplicate_property_declarations --- components/style/properties/properties.mako.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index 93a0d6533f5e..1f3174391ea9 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -329,7 +329,7 @@ mod property_bit_field { /// /// The input and output are in source order fn deduplicate_property_declarations(block: &mut PropertyDeclarationBlock) { - let mut deduplicated = Vec::new(); + let mut deduplicated = Vec::with_capacity(block.declarations.len()); let mut seen_normal = PropertyBitField::new(); let mut seen_important = PropertyBitField::new(); let mut seen_custom_normal = Vec::new();