Skip to content

Commit

Permalink
Merge #3296
Browse files Browse the repository at this point in the history
3296: Use the right collection when parsing type section r=ptitSeb a=ptitSeb

# Description
Use the right collection when parsing type section

based on near/wasmer#144

For #3305 

Co-authored-by: ptitSeb <sebastien.chev@gmail.com>
  • Loading branch information
bors[bot] and ptitSeb authored Nov 21, 2022
2 parents 1b15406 + 9b599eb commit 71a2761
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/compiler/src/translator/sections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Type> = 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<Type> = returns
let sig_returns: Box<[Type]> = returns
.iter()
.map(|ty| {
wptype_to_type(*ty)
Expand Down

0 comments on commit 71a2761

Please sign in to comment.