diff --git a/actix-utils/src/timeout.rs b/actix-utils/src/timeout.rs index 165dcde3..7ed11388 100644 --- a/actix-utils/src/timeout.rs +++ b/actix-utils/src/timeout.rs @@ -12,7 +12,7 @@ use futures::{Async, Future, Poll}; use tokio_timer::{clock, Delay}; /// Applies a timeout to requests. -#[derive(Debug, Clone)] +#[derive(Debug)] pub struct Timeout { timeout: Duration, _t: PhantomData, @@ -65,6 +65,12 @@ impl Timeout { } } +impl Clone for Timeout { + fn clone(&self) -> Self { + Timeout::new(self.timeout) + } +} + impl NewTransform for Timeout where S: Service,