diff --git a/crates/jit/src/instantiate.rs b/crates/jit/src/instantiate.rs index b5f0daf82bf9..8c8740d66d2d 100644 --- a/crates/jit/src/instantiate.rs +++ b/crates/jit/src/instantiate.rs @@ -568,10 +568,10 @@ impl CompiledModule { /// this module, providing both their index and their in-memory body. pub fn array_to_wasm_trampolines( &self, - ) -> impl ExactSizeIterator + '_ { + ) -> impl Iterator + '_ { self.funcs .keys() - .map(move |i| (i, self.array_to_wasm_trampoline(i).unwrap())) + .filter_map(move |i| Some((i, self.array_to_wasm_trampoline(i)?))) } /// Get the native-to-Wasm trampoline for the function `index` points to. @@ -590,10 +590,10 @@ impl CompiledModule { /// this module, providing both their index and their in-memory body. pub fn native_to_wasm_trampolines( &self, - ) -> impl ExactSizeIterator + '_ { + ) -> impl Iterator + '_ { self.funcs .keys() - .map(move |i| (i, self.native_to_wasm_trampoline(i).unwrap())) + .filter_map(move |i| Some((i, self.native_to_wasm_trampoline(i)?))) } /// Get the Wasm-to-native trampoline for the given signature.