I'm trying to figure out how to set up an abort handle for a task started with actix::spawn.
This earlier thread seems to be what I want to do, however, it's using async_std instead of actix and attempting to pass the output of Abortable::new to actix::spawn gives a type mismatch:
type mismatch resolving `<Abortable<impl futures::Future> as futures::Future>::Output == ()`
expected unit type `()`
found enum `std::result::Result<(), Aborted>`
You shouldn't need to use Abortable - the JoinHandle returned by spawn has an abort method.
If you did want to use Abortable however you can do async { let _ = abortable.await; } to convert a future that resolves to a Result into a future that resolves to a ().