Use reserve_exact instead of reserve when the max size is known.

This commit is contained in:
Dan Gohman
2017-11-16 15:16:23 -08:00
parent 4d9aedbaca
commit bfa5a72b77

View File

@@ -148,7 +148,7 @@ impl DomForest {
liveness: &Liveness,
) -> Result<(), (Value, Value)> {
self.clear();
self.values.reserve(va.len() + vb.len());
self.values.reserve_exact(va.len() + vb.len());
// Convert the two value lists into a merged sequence of nodes.
let merged = MergedNodes {