diff --git a/soroban-env-host/src/host.rs b/soroban-env-host/src/host.rs index cf185fcb7..32fc9b3f3 100644 --- a/soroban-env-host/src/host.rs +++ b/soroban-env-host/src/host.rs @@ -1228,7 +1228,7 @@ impl EnvBase for Host { fn symbol_index_in_strs(&self, sym: Symbol, slices: &[&str]) -> Result { let mut found = None; - self.metered_scan_slice_of_slices(slices, |i, slice| { + self.scan_slice_of_slices(slices, |i, slice| { if self.symbol_matches(slice.as_bytes(), sym)? && found.is_none() { found = Some(i) } diff --git a/soroban-env-host/src/host/mem_helper.rs b/soroban-env-host/src/host/mem_helper.rs index c75ee7fd8..a98d5e8e2 100644 --- a/soroban-env-host/src/host/mem_helper.rs +++ b/soroban-env-host/src/host/mem_helper.rs @@ -209,7 +209,7 @@ impl Host { Ok(()) } - pub(crate) fn metered_scan_slice_of_slices( + pub(crate) fn scan_slice_of_slices( &self, slices: &[&str], mut callback: impl FnMut(usize, &str) -> Result<(), HostError>, @@ -303,8 +303,6 @@ impl Host { let obj_end = obj_pos .checked_add(len) .ok_or_else(|| self.err_arith_overflow())? as usize; - // TODO: we currently grow the destination vec if it's not big enough, - // make sure this is desirable behaviour. if obj_new.len() < obj_end { self.charge_budget( ContractCostType::HostMemAlloc,