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:
parent
bd4c4cda8b
commit
6a9df026e7
@ -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
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user