aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2017-01-31 16:43:57 -0800
committerManish Goregaokar <manishsmail@gmail.com>2017-01-31 16:43:57 -0800
commit5117b7ec5aba67e7d342287f1e6bf6313349ed43 (patch)
treea1f7be3a0295551f3d4170f795df54eba70b9d98
parent77f53aae3eee59957521ea76e95bd3e454c4ddd9 (diff)
downloadservo-5117b7ec5aba67e7d342287f1e6bf6313349ed43.tar.gz
servo-5117b7ec5aba67e7d342287f1e6bf6313349ed43.zip
Preallocate in deduplicate_property_declarations
-rw-r--r--components/style/properties/properties.mako.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs
index 93a0d6533f5..1f3174391ea 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();