mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-27 22:32:57 +01:00
fix Clone impl for Timeout
This commit is contained in:
parent
406088524e
commit
663ae53954
@ -12,7 +12,7 @@ use futures::{Async, Future, Poll};
|
|||||||
use tokio_timer::{clock, Delay};
|
use tokio_timer::{clock, Delay};
|
||||||
|
|
||||||
/// Applies a timeout to requests.
|
/// Applies a timeout to requests.
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug)]
|
||||||
pub struct Timeout<E = ()> {
|
pub struct Timeout<E = ()> {
|
||||||
timeout: Duration,
|
timeout: Duration,
|
||||||
_t: PhantomData<E>,
|
_t: PhantomData<E>,
|
||||||
@ -65,6 +65,12 @@ impl<E> Timeout<E> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<E> Clone for Timeout<E> {
|
||||||
|
fn clone(&self) -> Self {
|
||||||
|
Timeout::new(self.timeout)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<S, E> NewTransform<S> for Timeout<E>
|
impl<S, E> NewTransform<S> for Timeout<E>
|
||||||
where
|
where
|
||||||
S: Service,
|
S: Service,
|
||||||
|
Loading…
Reference in New Issue
Block a user