diff options
| author | Henry Gressmann <mail@henrygressmann.de> | 2024-01-23 23:04:01 +0100 |
|---|---|---|
| committer | Henry Gressmann <mail@henrygressmann.de> | 2024-01-23 23:04:01 +0100 |
| commit | 0382b0660280a828498310322bfd2d50de51187a (patch) | |
| tree | 928c5fea9fe723b0ad48231f78a92a10a8a58767 /crates/parser/src/lib.rs | |
| parent | 31df65ad9b92eb886da2a44afc06925c1be6d568 (diff) | |
chore: support partially initialized module instances
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'crates/parser/src/lib.rs')
| -rw-r--r-- | crates/parser/src/lib.rs | 6 |
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(), }, ) }) |
