mirror of
https://github.com/fafhrd91/actix-net
synced 2025-01-18 20:01:48 +01:00
add Clone impl for Apply service
This commit is contained in:
parent
d47f1fb730
commit
35218a4df1
@ -1,5 +1,10 @@
|
||||
# Changes
|
||||
|
||||
### Added
|
||||
|
||||
* Add Clone impl for Apply service
|
||||
|
||||
|
||||
## [1.0.0-alpha.4] - 2019-12-08
|
||||
|
||||
### Changed
|
||||
|
@ -56,6 +56,21 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<T, F, R, In, Out, Err> Clone for Apply<T, F, R, In, Out, Err>
|
||||
where
|
||||
T: Service<Error = Err> + Clone,
|
||||
F: FnMut(In, &mut T) -> R + Clone,
|
||||
R: Future<Output = Result<Out, Err>>,
|
||||
{
|
||||
fn clone(&self) -> Self {
|
||||
Apply {
|
||||
service: self.service.clone(),
|
||||
f: self.f.clone(),
|
||||
r: PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T, F, R, In, Out, Err> Service for Apply<T, F, R, In, Out, Err>
|
||||
where
|
||||
T: Service<Error = Err>,
|
||||
|
Loading…
x
Reference in New Issue
Block a user