Skip to content

Commit

Permalink
Fix incorrect sample code in documentation (bytecodealliance#6796)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
anoopelias committed Aug 3, 2023
1 parent 615d697 commit a595f63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/wasmtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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, ())?;
Expand Down

0 comments on commit a595f63

Please sign in to comment.