diff --git a/crates/vm/src/arch/config.rs b/crates/vm/src/arch/config.rs index 305a51c1bd..ff5e75fd89 100644 --- a/crates/vm/src/arch/config.rs +++ b/crates/vm/src/arch/config.rs @@ -72,7 +72,7 @@ where } pub trait VmExecutionConfig { - type Executor: AnyEnum + Send + Sync; + type Executor: AnyEnum; fn create_executors(&self) -> Result, ExecutorInventoryError>; diff --git a/crates/vm/src/arch/interpreter_preflight.rs b/crates/vm/src/arch/interpreter_preflight.rs index 2cd59c80d1..187ab13d37 100644 --- a/crates/vm/src/arch/interpreter_preflight.rs +++ b/crates/vm/src/arch/interpreter_preflight.rs @@ -101,17 +101,13 @@ impl PreflightInterpretedInstance { &self.inventory.executors } - pub fn filtered_execution_frequencies(&self) -> Vec - where - E: Send + Sync, - { + pub fn filtered_execution_frequencies(&self) -> Vec { let base_idx = get_pc_index(self.pc_base); self.pc_handler .par_iter() - .enumerate() + .zip_eq(&self.execution_frequencies) .skip(base_idx) - .filter(|(_, entry)| entry.is_some()) - .map(|(i, _)| self.execution_frequencies[i]) + .filter_map(|(entry, freq)| entry.is_some().then_some(*freq)) .collect() }