1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-08-31 18:36:59 +02:00

change to IntoFuture

This commit is contained in:
Nikolay Kim
2019-03-04 20:29:35 -08:00
parent 700abc997e
commit ed14e6b8ea
15 changed files with 89 additions and 64 deletions

View File

@@ -1,5 +1,5 @@
use crate::{NewService, Service};
use futures::{Future, Poll};
use futures::{Future, IntoFuture, Poll};
pub type BoxedService<Req, Res, Err> = Box<
Service<
@@ -96,7 +96,12 @@ where
type Future = Box<Future<Item = Self::Service, Error = Self::InitError>>;
fn new_service(&self, cfg: &C) -> Self::Future {
Box::new(self.service.new_service(cfg).map(ServiceWrapper::boxed))
Box::new(
self.service
.new_service(cfg)
.into_future()
.map(ServiceWrapper::boxed),
)
}
}