1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-09-01 03:47:17 +02:00

simplify transform trait

This commit is contained in:
Nikolay Kim
2019-03-04 19:38:11 -08:00
parent 9bc492cf6c
commit 8c48bf4de7
15 changed files with 288 additions and 825 deletions

View File

@@ -96,11 +96,7 @@ 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(|service| ServiceWrapper::boxed(service)),
)
Box::new(self.service.new_service(cfg).map(ServiceWrapper::boxed))
}
}