diff --git a/actix-service/CHANGES.md b/actix-service/CHANGES.md index 3d527824..ca18613d 100644 --- a/actix-service/CHANGES.md +++ b/actix-service/CHANGES.md @@ -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 diff --git a/actix-service/src/apply.rs b/actix-service/src/apply.rs index 5b9a0a02..5fb984d4 100644 --- a/actix-service/src/apply.rs +++ b/actix-service/src/apply.rs @@ -102,6 +102,21 @@ where } } +impl Clone for ApplyServiceFactory +where + T: ServiceFactory + Clone, + F: FnMut(In, &mut T::Service) -> R + Clone, + R: Future>, +{ + fn clone(&self) -> Self { + Self { + service: self.service.clone(), + f: self.f.clone(), + r: PhantomData, + } + } +} + impl ServiceFactory for ApplyServiceFactory where T: ServiceFactory,