From 8aa10f15ade60ad0ed7f822a89142fcd2fb33f28 Mon Sep 17 00:00:00 2001 From: Edgar Luque Date: Mon, 21 Oct 2024 12:18:50 +0200 Subject: [PATCH] small opt --- src/utils/block_ext.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/block_ext.rs b/src/utils/block_ext.rs index 666034702..66935e4a7 100644 --- a/src/utils/block_ext.rs +++ b/src/utils/block_ext.rs @@ -392,8 +392,8 @@ impl<'ctx> BlockExt<'ctx> for Block<'ctx> { indexes: &[GepIndex<'ctx, '_>], elem_type: Type<'ctx>, ) -> Result, Error> { - let mut dynamic_indices = Vec::new(); - let mut raw_constant_indices = Vec::new(); + let mut dynamic_indices = Vec::with_capacity(indexes.len()); + let mut raw_constant_indices = Vec::with_capacity(indexes.len()); for index in indexes { match index {