1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 22:49:21 +02:00

add default handler

This commit is contained in:
Nikolay Kim
2019-03-31 18:19:18 -07:00
parent e4b3f79458
commit ab45974e35
4 changed files with 171 additions and 76 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::{
ApplyTransform, IntoNewService, IntoTransform, NewService, Service, Transform,
apply_transform, IntoNewService, IntoTransform, NewService, Service, Transform,
};
use futures::future::{ok, Either, FutureResult};
use futures::{Async, Future, IntoFuture, Poll};
@ -254,7 +254,7 @@ where
>,
F: IntoTransform<M, T::Service>,
{
let endpoint = ApplyTransform::new(mw, self.endpoint);
let endpoint = apply_transform(mw, self.endpoint);
Resource {
endpoint,
rdef: self.rdef,