mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-23 21:51:06 +01:00
impl Clone for TakeItem and TakeItemService
This commit is contained in:
parent
dc19a9f862
commit
6c25becd3f
@ -103,6 +103,12 @@ impl<T> TakeItem<T> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> Clone for TakeItem<T> {
|
||||
fn clone(&self) -> TakeItem<T> {
|
||||
TakeItem { _t: PhantomData }
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Stream> NewService for TakeItem<T> {
|
||||
type Request = T;
|
||||
type Response = (Option<T::Item>, T);
|
||||
@ -121,6 +127,12 @@ pub struct TakeItemService<T> {
|
||||
_t: PhantomData<T>,
|
||||
}
|
||||
|
||||
impl<T> Clone for TakeItemService<T> {
|
||||
fn clone(&self) -> TakeItemService<T> {
|
||||
TakeItemService { _t: PhantomData }
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Stream> Service for TakeItemService<T> {
|
||||
type Request = T;
|
||||
type Response = (Option<T::Item>, T);
|
||||
|
Loading…
Reference in New Issue
Block a user