diff options
| author | Henry Gressmann <mail@henrygressmann.de> | 2023-12-04 01:06:59 +0100 |
|---|---|---|
| committer | Henry Gressmann <mail@henrygressmann.de> | 2023-12-04 01:06:59 +0100 |
| commit | 21f5e8f932b29623ce4108ce5f941f2e9fa056a4 (patch) | |
| tree | e6a05ccc8a525c9ec961fdceee7349119b9fc6e0 /crates/cli/bin.rs | |
| parent | a4d2df2255a026be4bb8a46209de2e6d75410a70 (diff) | |
chore: refactoring
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'crates/cli/bin.rs')
| -rw-r--r-- | crates/cli/bin.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/cli/bin.rs b/crates/cli/bin.rs index ce33544..181b2e1 100644 --- a/crates/cli/bin.rs +++ b/crates/cli/bin.rs @@ -82,9 +82,8 @@ fn run(wasm: &[u8]) -> Result<()> { let mut store = tinywasm::Store::default(); let module = tinywasm::Module::parse_bytes(wasm)?; - let mut instance = module.instantiate(&mut store)?; - - let mut func = instance.get_func(&mut store, "add")?; + let instance = module.instantiate(&mut store)?; + let func = instance.get_func(&store, "add")?; let params = vec![WasmValue::I32(2), WasmValue::I32(2)]; let res = func.call(&mut store, params)?; info!("{res:?}"); |
