Skip to content

Commit

Permalink
Fix incorrect sample code in documentation (bytecodealliance#6796) (b…
Browse files Browse the repository at this point in the history
…ytecodealliance#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.
  • Loading branch information
anoopelias authored and eduardomourar committed Aug 18, 2023
1 parent ce2e076 commit ea7a6db
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 ea7a6db

Please sign in to comment.