Skip to content

Commit

Permalink
wasmtime-api: reserve_exact on the correct vector (#452)
Browse files Browse the repository at this point in the history
Fix what looks like a copy-paste issue in wasmtime-api/src/module.rs,
which led to calling reserve_exact on one vector before pushing that
many elements into another.
  • Loading branch information
joshtriplett authored and yurydelendik committed Oct 28, 2019
1 parent 71dd73d commit faee3b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wasmtime-api/src/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ fn read_imports_and_exports(
}
SectionCode::Function => {
let section = section.get_function_section_reader()?;
sigs.reserve_exact(section.get_count() as usize);
func_sig.reserve_exact(section.get_count() as usize);
for entry in section {
func_sig.push(entry?);
}
Expand Down

0 comments on commit faee3b4

Please sign in to comment.