diff options
author | Manish Goregaokar <manishsmail@gmail.com> | 2017-01-31 16:43:57 -0800 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2017-01-31 16:43:57 -0800 |
commit | 5117b7ec5aba67e7d342287f1e6bf6313349ed43 (patch) | |
tree | a1f7be3a0295551f3d4170f795df54eba70b9d98 | |
parent | 77f53aae3eee59957521ea76e95bd3e454c4ddd9 (diff) | |
download | servo-5117b7ec5aba67e7d342287f1e6bf6313349ed43.tar.gz servo-5117b7ec5aba67e7d342287f1e6bf6313349ed43.zip |
Preallocate in deduplicate_property_declarations
-rw-r--r-- | components/style/properties/properties.mako.rs | 2 |
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(); |