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

Add missing Clone impl for factory_fn_cfg

This commit is contained in:
Nikolay Kim 2019-12-03 14:05:23 +06:00
parent bd4c4cda8b
commit 6a9df026e7
2 changed files with 18 additions and 0 deletions

View File

@ -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

View File

@ -184,6 +184,20 @@ where
}
}
impl<F, Fut, Cfg, Srv, Err> Clone for FnServiceConfig<F, Fut, Cfg, Srv, Err>
where
F: Fn(Cfg) -> Fut + Clone,
Fut: Future<Output = Result<Srv, Err>>,
Srv: Service,
{
fn clone(&self) -> Self {
FnServiceConfig {
f: self.f.clone(),
_t: PhantomData,
}
}
}
impl<F, Fut, Cfg, Srv, Err> ServiceFactory for FnServiceConfig<F, Fut, Cfg, Srv, Err>
where
F: Fn(Cfg) -> Fut,