diff --git a/src/api/mod.rs b/src/api/mod.rs index 09ff964c..4ed3ddec 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -343,7 +343,7 @@ impl ToTokens for Api { } impl ::futures::future::FutureFrom<::http::Request<::hyper::Body>> for Request { - type Future = Box<_Future>; + type Future = Box<_Future + Send>; type Error = ::ruma_api::Error; #[allow(unused_variables)] @@ -405,12 +405,11 @@ impl ToTokens for Api { } impl ::futures::future::FutureFrom<::http::Response<::hyper::Body>> for Response { - type Future = Box<_Future>; + type Future = Box<_Future + Send>; type Error = ::ruma_api::Error; #[allow(unused_variables)] - fn future_from(http_response: ::http::Response<::hyper::Body>) - -> Box<_Future> { + fn future_from(http_response: ::http::Response<::hyper::Body>) -> Self::Future { if http_response.status().is_success() { #extract_response_headers