summaryrefslogtreecommitdiff
path: root/crates/parser/src
diff options
context:
space:
mode:
authorHenry Gressmann <mail@henrygressmann.de>2024-01-23 23:04:01 +0100
committerHenry Gressmann <mail@henrygressmann.de>2024-01-23 23:04:01 +0100
commit0382b0660280a828498310322bfd2d50de51187a (patch)
tree928c5fea9fe723b0ad48231f78a92a10a8a58767 /crates/parser/src
parent31df65ad9b92eb886da2a44afc06925c1be6d568 (diff)
chore: support partially initialized module instances
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'crates/parser/src')
-rw-r--r--crates/parser/src/lib.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/parser/src/lib.rs b/crates/parser/src/lib.rs
index ae6cc4d..aa76ea3 100644
--- a/crates/parser/src/lib.rs
+++ b/crates/parser/src/lib.rs
@@ -120,7 +120,11 @@ impl TryFrom<ModuleReader> for TinyWasmModule {
WasmFunction {
instructions: f.body,
locals: f.locals,
- ty: reader.func_types.get(ty_idx as usize).unwrap().clone(),
+ ty: reader
+ .func_types
+ .get(ty_idx as usize)
+ .expect("No func type for func, this is a bug")
+ .clone(),
},
)
})