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:
committed by
Yury Delendik
parent
71dd73d672
commit
faee3b4bc3
@@ -91,7 +91,7 @@ fn read_imports_and_exports(
|
|||||||
}
|
}
|
||||||
SectionCode::Function => {
|
SectionCode::Function => {
|
||||||
let section = section.get_function_section_reader()?;
|
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 {
|
for entry in section {
|
||||||
func_sig.push(entry?);
|
func_sig.push(entry?);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user