mirror of
https://github.com/actix/actix-web.git
synced 2025-01-17 04:35:57 +00:00
impl Clone for TakeItem and TakeItemService
This commit is contained in:
parent
dc19a9f862
commit
6c25becd3f
1 changed files with 12 additions and 0 deletions
|
@ -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 a new issue