$ cargo +nightly test
error[E0277]: `R` cannot be sent between threads safely
--> src/handler.rs:41:34
|
41 | Arbiter::spawn_async(fut.boxed())
| ^^^^^ `R` cannot be sent between threads safely
|
= help: within `impl core::future::future::Future`, the trait `std::marker::Send` is not implemented for `R`
= help: consider adding a `where R: std::marker::Send` bound
= note: required because it appears within the type `std::option::Option<R>`
= note: required because it appears within the type `[static generator@src/handler.rs:35:30: 40:10 self:handler::ResponseStdFuture<T>, tx:std::option::Option<R> _]`
= note: required because it appears within the type `std::future::GenFuture<[static generator@src/handler.rs:35:30: 40:10 self:handler::ResponseStdFuture<T>, tx:std::option::Option<R> _]>`
= note: required because it appears within the type `impl core::future::future::Future`
error[E0277]: `*mut (dyn core::future::future::Future<Output = T> + 'static)` cannot be sent between threads safely
--> src/handler.rs:41:34
|
41 | Arbiter::spawn_async(fut.boxed())
| ^^^^^ `*mut (dyn core::future::future::Future<Output = T> + 'static)` cannot be sent between threads safely
|
= help: within `impl core::future::future::Future`, the trait `std::marker::Send` is not implemented for `*mut (dyn core::future::future::Future<Output = T> + 'static)`
= note: required because it appears within the type `futures_core::future::future_obj::LocalFutureObj<'static, T>`
= note: required because it appears within the type `handler::ResponseStdFuture<T>`
= note: required because it appears within the type `[static generator@src/handler.rs:35:30: 40:10 self:handler::ResponseStdFuture<T>, tx:std::option::Option<R> _]`
= note: required because it appears within the type `std::future::GenFuture<[static generator@src/handler.rs:35:30: 40:10 self:handler::ResponseStdFuture<T>, tx:std::option::Option<R> _]>`
= note: required because it appears within the type `impl core::future::future::Future`