1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-01-18 23:21:50 +01:00

add Clone for apply combinator

This commit is contained in:
Nikolay Kim 2019-12-03 16:15:06 +06:00
parent cbc5da8625
commit eb33f0ecbe
2 changed files with 16 additions and 1 deletions

View File

@ -2,7 +2,7 @@
## [1.0.0-alpha.3] - 2019-12-xx
### Add missing Clone impl for factory_fn_cfg
### Add missing Clone impls
## [1.0.0-alpha.2] - 2019-12-02

View File

@ -102,6 +102,21 @@ where
}
}
impl<T, F, R, In, Out, Err> Clone for ApplyServiceFactory<T, F, R, In, Out, Err>
where
T: ServiceFactory<Error = Err> + Clone,
F: FnMut(In, &mut T::Service) -> R + Clone,
R: Future<Output = Result<Out, Err>>,
{
fn clone(&self) -> Self {
Self {
service: self.service.clone(),
f: self.f.clone(),
r: PhantomData,
}
}
}
impl<T, F, R, In, Out, Err> ServiceFactory for ApplyServiceFactory<T, F, R, In, Out, Err>
where
T: ServiceFactory<Error = Err>,