Make the Future returned by generated future_from
s be Send
This commit is contained in:
parent
e23eff151b
commit
e4ec9442d8
@ -343,7 +343,7 @@ impl ToTokens for Api {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl ::futures::future::FutureFrom<::http::Request<::hyper::Body>> for Request {
|
impl ::futures::future::FutureFrom<::http::Request<::hyper::Body>> for Request {
|
||||||
type Future = Box<_Future<Item = Self, Error = Self::Error>>;
|
type Future = Box<_Future<Item = Self, Error = Self::Error> + Send>;
|
||||||
type Error = ::ruma_api::Error;
|
type Error = ::ruma_api::Error;
|
||||||
|
|
||||||
#[allow(unused_variables)]
|
#[allow(unused_variables)]
|
||||||
@ -405,12 +405,11 @@ impl ToTokens for Api {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl ::futures::future::FutureFrom<::http::Response<::hyper::Body>> for Response {
|
impl ::futures::future::FutureFrom<::http::Response<::hyper::Body>> for Response {
|
||||||
type Future = Box<_Future<Item = Self, Error = Self::Error>>;
|
type Future = Box<_Future<Item = Self, Error = Self::Error> + Send>;
|
||||||
type Error = ::ruma_api::Error;
|
type Error = ::ruma_api::Error;
|
||||||
|
|
||||||
#[allow(unused_variables)]
|
#[allow(unused_variables)]
|
||||||
fn future_from(http_response: ::http::Response<::hyper::Body>)
|
fn future_from(http_response: ::http::Response<::hyper::Body>) -> Self::Future {
|
||||||
-> Box<_Future<Item = Self, Error = Self::Error>> {
|
|
||||||
if http_response.status().is_success() {
|
if http_response.status().is_success() {
|
||||||
#extract_response_headers
|
#extract_response_headers
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user