Open kylebarron opened 2 years ago
Still having the same issue with cargo & rustc version 1.63.0, but with a little more detailed message:
error[E0308]: mismatched types
--> src/lib.rs:71:24
|
71 | executor::run(Some(task1));
| ---- ^^^^^ expected struct `Task`, found struct `TaskHandle`
| |
| arguments to this enum variant are incorrect
|
= note: expected struct `Task`
found struct `TaskHandle<()>`
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:
executor::run(Some(task1.task()));