From ea7a6db81563fb0e9437c29836bae96ea2dff4f6 Mon Sep 17 00:00:00 2001 From: Anoop Elias Date: Thu, 3 Aug 2023 22:12:14 +0530 Subject: [PATCH] Fix incorrect sample code in documentation (#6796) (#6797) Sample code provided in Readme of `wasmtime` crate specifies three generic arguments for `get_typed_func` API, while it needs only two. This fixes the sample code by removing the last generic argument. --- crates/wasmtime/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/wasmtime/README.md b/crates/wasmtime/README.md index a1b29d7fe344..8552c90bcccd 100644 --- a/crates/wasmtime/README.md +++ b/crates/wasmtime/README.md @@ -94,7 +94,7 @@ fn main() -> Result<()> { // this case we're using `4` for. let mut store = Store::new(&engine, 4); let instance = linker.instantiate(&mut store, &module)?; - let hello = instance.get_typed_func::<(), (), _>(&mut store, "hello")?; + let hello = instance.get_typed_func::<(), ()>(&mut store, "hello")?; // And finally we can call the wasm! hello.call(&mut store, ())?;