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:
@@ -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),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user