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

update middleware impl

This commit is contained in:
Nikolay Kim
2019-03-04 21:37:57 -08:00
parent 2e79562c9d
commit b6fe1dacf2
7 changed files with 102 additions and 103 deletions

View File

@@ -4,7 +4,7 @@ use std::rc::Rc;
use actix_http::{Error, Response};
use actix_service::boxed::{self, BoxedNewService, BoxedService};
use actix_service::{
ApplyNewService, IntoNewService, IntoNewTransform, NewService, NewTransform, Service,
ApplyTransform, IntoNewService, IntoTransform, NewService, Service, Transform,
};
use futures::future::{ok, Either, FutureResult};
use futures::{Async, Future, IntoFuture, Poll};
@@ -194,16 +194,16 @@ where
>,
>
where
M: NewTransform<
M: Transform<
T::Service,
Request = ServiceRequest<P>,
Response = ServiceResponse,
Error = (),
InitError = (),
>,
F: IntoNewTransform<M, T::Service>,
F: IntoTransform<M, T::Service>,
{
let endpoint = ApplyNewService::new(mw, self.endpoint);
let endpoint = ApplyTransform::new(mw, self.endpoint);
Resource {
endpoint,
routes: self.routes,