diff --git a/actix-service/CHANGES.md b/actix-service/CHANGES.md index c33abe36..3d527824 100644 --- a/actix-service/CHANGES.md +++ b/actix-service/CHANGES.md @@ -1,5 +1,9 @@ # Changes +## [1.0.0-alpha.3] - 2019-12-xx + +### Add missing Clone impl for factory_fn_cfg + ## [1.0.0-alpha.2] - 2019-12-02 ### Use owned config value for service factory diff --git a/actix-service/src/fn_service.rs b/actix-service/src/fn_service.rs index 33b9c720..32781f73 100644 --- a/actix-service/src/fn_service.rs +++ b/actix-service/src/fn_service.rs @@ -184,6 +184,20 @@ where } } +impl Clone for FnServiceConfig +where + F: Fn(Cfg) -> Fut + Clone, + Fut: Future>, + Srv: Service, +{ + fn clone(&self) -> Self { + FnServiceConfig { + f: self.f.clone(), + _t: PhantomData, + } + } +} + impl ServiceFactory for FnServiceConfig where F: Fn(Cfg) -> Fut,