1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-30 16:40:21 +02:00

update tests for defaultheaders middleware

This commit is contained in:
Nikolay Kim
2019-03-02 21:35:31 -08:00
parent 8103d33270
commit 352e7b7a75
2 changed files with 56 additions and 29 deletions

View File

@@ -8,6 +8,7 @@ use actix_http::{
ResponseHead,
};
use actix_router::{Path, Url};
use futures::future::{ok, FutureResult, IntoFuture};
use crate::request::HttpRequest;
@@ -288,3 +289,13 @@ impl<B: MessageBody> Into<Response<B>> for ServiceResponse<B> {
self.response
}
}
impl<B: MessageBody> IntoFuture for ServiceResponse<B> {
type Item = ServiceResponse<B>;
type Error = Error;
type Future = FutureResult<ServiceResponse<B>, Error>;
fn into_future(self) -> Self::Future {
ok(self)
}
}