Skip to content

Commit

Permalink
Fix vec pushing
Browse files Browse the repository at this point in the history
  • Loading branch information
chipshort committed Jan 24, 2024
1 parent 7a67c4b commit af5ceeb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vm/src/parsed_wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ impl<'a> ParsedWasm<'a> {
Payload::TypeSection(t) => {
this.type_count = t.get_count();
this.type_params = Vec::with_capacity(t.get_count() as usize);
for (type_index, t_res) in t.into_iter().enumerate() {
for t_res in t.into_iter() {
let ty: Type = t_res?;
match ty {
Type::Func(ft) => {
this.type_params.insert(type_index, ft.params().len());
this.type_params.push(ft.params().len());

this.max_func_params =
core::cmp::max(ft.params().len(), this.max_func_params);
Expand Down

0 comments on commit af5ceeb

Please sign in to comment.