Use Vec::with_capacity.

This commit is contained in:
Dan Gohman
2019-01-03 12:37:14 -08:00
parent fdc66e130f
commit 00a84672f7

View File

@@ -25,7 +25,7 @@ impl Table {
match plan.style {
TableStyle::CallerChecksSignature => {
let mut vec = Vec::new();
let mut vec = Vec::with_capacity(plan.table.minimum as usize);
vec.resize(
plan.table.minimum as usize,
VMCallerCheckedAnyfunc::default(),