wasmtime-api: reserve_exact on the correct vector (#452)

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.
This commit is contained in:
Josh Triplett
2019-10-28 10:57:51 -07:00
committed by Yury Delendik
parent 71dd73d672
commit faee3b4bc3

View File

@@ -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?);
}