summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorHenry <mail@henrygressmann.de>2026-04-03 17:55:37 +0200
committerHenry <mail@henrygressmann.de>2026-04-03 17:55:37 +0200
commit51bac3ce0e72195fa3ebf3ef4fb287bc5451b6f7 (patch)
tree139d4f609ab44d531cab20e96774f85c351123d8 /examples
parent065dc608ab25030d1719fef4dd55271c95245884 (diff)
chore: fix debug feature
Signed-off-by: Henry <mail@henrygressmann.de>
Diffstat (limited to 'examples')
-rw-r--r--examples/funcref_callbacks.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/examples/funcref_callbacks.rs b/examples/funcref_callbacks.rs
index 4ee7438..a460df8 100644
--- a/examples/funcref_callbacks.rs
+++ b/examples/funcref_callbacks.rs
@@ -58,9 +58,7 @@ fn run_passed_funcref_example() -> Result<()> {
// Host cannot call a funcref directly, so it routes through Wasm.
let call_by_ref =
ctx.module().exported_func::<(FuncRef, i32, i32), i32>(ctx.store(), "call_binop_by_ref")?;
- let result = call_by_ref.call(ctx.store_mut(), (func_ref, LHS, RHS))?;
- println!("(funcref {func_ref:?})({LHS},{RHS}) results in {result}");
-
+ let _result = call_by_ref.call(ctx.store_mut(), (func_ref, LHS, RHS))?;
Ok(())
}),
)?;
@@ -132,9 +130,8 @@ fn run_returned_funcref_example() -> Result<()> {
let call_by_ref = instance.exported_func::<(FuncRef, i32, i32), i32>(&store, "call_binop_by_ref")?;
- for (idx, func_ref) in [add_ref, sub_ref, mul_ref].iter().enumerate() {
- let result = call_by_ref.call(&mut store, (*func_ref, LHS, RHS))?;
- println!("At idx: {idx}, funcref {func_ref:?}({LHS},{RHS}) results in {result}");
+ for func_ref in [add_ref, sub_ref, mul_ref] {
+ let _result = call_by_ref.call(&mut store, (func_ref, LHS, RHS))?;
}
Ok(())
}