diff --git a/lib/compiler/src/translator/sections.rs b/lib/compiler/src/translator/sections.rs index 9759c2d51..895d48503 100644 --- a/lib/compiler/src/translator/sections.rs +++ b/lib/compiler/src/translator/sections.rs @@ -17,6 +17,7 @@ use crate::{WasmError, WasmResult}; use core::convert::TryFrom; use std::boxed::Box; use std::collections::HashMap; +use std::sync::Arc; use std::vec::Vec; use wasmer_types::entity::packed_option::ReservedValue; use wasmer_types::entity::EntityRef; @@ -60,14 +61,14 @@ pub fn parse_type_section( for entry in types { if let Ok(TypeDef::Func(WPFunctionType { params, returns })) = entry { - let sig_params: Vec = params + let sig_params: Arc<[Type]> = params .iter() .map(|ty| { wptype_to_type(*ty) .expect("only numeric types are supported in function signatures") }) .collect(); - let sig_returns: Vec = returns + let sig_returns: Arc<[Type]> = returns .iter() .map(|ty| { wptype_to_type(*ty)