1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-20 12:45:41 +02:00

update actix-service

This commit is contained in:
Nikolay Kim
2019-03-05 10:08:08 -08:00
parent b6fe1dacf2
commit 03248028a9
11 changed files with 132 additions and 159 deletions

View File

@@ -84,12 +84,11 @@ impl DefaultHeaders {
}
}
impl<S, P, B> Transform<S> for DefaultHeaders
impl<S, P, B> Transform<S, ServiceRequest<P>> for DefaultHeaders
where
S: Service<Request = ServiceRequest<P>, Response = ServiceResponse<B>>,
S: Service<ServiceRequest<P>, Response = ServiceResponse<B>>,
S::Future: 'static,
{
type Request = ServiceRequest<P>;
type Response = ServiceResponse<B>;
type Error = S::Error;
type InitError = ();
@@ -109,12 +108,11 @@ pub struct DefaultHeadersMiddleware<S> {
inner: Rc<Inner>,
}
impl<S, P, B> Service for DefaultHeadersMiddleware<S>
impl<S, P, B> Service<ServiceRequest<P>> for DefaultHeadersMiddleware<S>
where
S: Service<Request = ServiceRequest<P>, Response = ServiceResponse<B>>,
S: Service<ServiceRequest<P>, Response = ServiceResponse<B>>,
S::Future: 'static,
{
type Request = ServiceRequest<P>;
type Response = ServiceResponse<B>;
type Error = S::Error;
type Future = Box<Future<Item = Self::Response, Error = Self::Error>>;