Use Vec::with_capacity.
This commit is contained in:
@@ -25,7 +25,7 @@ impl Table {
|
|||||||
|
|
||||||
match plan.style {
|
match plan.style {
|
||||||
TableStyle::CallerChecksSignature => {
|
TableStyle::CallerChecksSignature => {
|
||||||
let mut vec = Vec::new();
|
let mut vec = Vec::with_capacity(plan.table.minimum as usize);
|
||||||
vec.resize(
|
vec.resize(
|
||||||
plan.table.minimum as usize,
|
plan.table.minimum as usize,
|
||||||
VMCallerCheckedAnyfunc::default(),
|
VMCallerCheckedAnyfunc::default(),
|
||||||
|
|||||||
Reference in New Issue
Block a user