You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> wasm-pack build
[INFO]: 🎯 Checking for the Wasm target...
[INFO]: 🌀 Compiling to Wasm...
Compiling async-executor-demo v0.1.0 (/Users/kyle/github/rust/async-executor/example)
error[E0308]: mismatched types
--> example/src/lib.rs:71:24
|
71 | executor::run(Some(task1));
| ^^^^^ expected struct `Task`, found struct `TaskHandle`
|
= note: expected struct `Task`
found struct `TaskHandle<()>`
For more information about this error, try `rustc --explain E0308`.
error: could not compile `async-executor-demo` due to previous error
Error: Compiling your crate to WebAssembly failed
Caused by: failed to execute `cargo build`: exited with exit status: 101
full command: "cargo" "build" "--lib" "--release" "--target" "wasm32-unknown-unknown"
Not sure if it's the right thing to do, but the example compiles and runs successfully if I add .task() call to convert Task into TaskHandle like this:
The text was updated successfully, but these errors were encountered: