From 6dcca7aa8100f1d08c3981079ef9d4606b0f01e3 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Thu, 10 Nov 2022 15:23:23 +0100 Subject: [PATCH] Use the reight collection when parsing type section --- lib/compiler/src/translator/sections.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/compiler/src/translator/sections.rs b/lib/compiler/src/translator/sections.rs index 451360ba836..e5ee7bb7b4b 100644 --- a/lib/compiler/src/translator/sections.rs +++ b/lib/compiler/src/translator/sections.rs @@ -61,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: Box<[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: Box<[Type]> = returns .iter() .map(|ty| { wptype_to_type(*ty)