From a595f63560f5663a32a7a91ad01c2edebf0476a1 Mon Sep 17 00:00:00 2001 From: Anoop Elias Date: Thu, 3 Aug 2023 12:18:27 +0530 Subject: [PATCH] Fix incorrect sample code in documentation (#6796) 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, ())?;