Remove explicit S type from component functions (#5722)

I ended up forgetting this as part of #5275.
This commit is contained in:
Alex Crichton
2023-02-06 16:07:57 -06:00
committed by GitHub
parent 939b6ea933
commit 284fec127a
11 changed files with 216 additions and 225 deletions

View File

@@ -28,13 +28,13 @@ async fn smoke() -> Result<()> {
.instantiate_async(&mut store, &component)
.await?;
let thunk = instance.get_typed_func::<(), (), _>(&mut store, "thunk")?;
let thunk = instance.get_typed_func::<(), ()>(&mut store, "thunk")?;
thunk.call_async(&mut store, ()).await?;
thunk.post_return_async(&mut store).await?;
let err = instance
.get_typed_func::<(), (), _>(&mut store, "thunk-trap")?
.get_typed_func::<(), ()>(&mut store, "thunk-trap")?
.call_async(&mut store, ())
.await
.unwrap_err();
@@ -79,7 +79,7 @@ async fn smoke_func_wrap() -> Result<()> {
let instance = linker.instantiate_async(&mut store, &component).await?;
let thunk = instance.get_typed_func::<(), (), _>(&mut store, "thunk")?;
let thunk = instance.get_typed_func::<(), ()>(&mut store, "thunk")?;
thunk.call_async(&mut store, ()).await?;
thunk.post_return_async(&mut store).await?;