From 00a84672f77b37a2ede20f6905a6beede73e03a3 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 3 Jan 2019 12:37:14 -0800 Subject: [PATCH] Use `Vec::with_capacity`. --- lib/runtime/src/table.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/runtime/src/table.rs b/lib/runtime/src/table.rs index cb4aae11a3..053269325f 100644 --- a/lib/runtime/src/table.rs +++ b/lib/runtime/src/table.rs @@ -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(),