From 663ae53954ac01d193993842d2b60f3d72592c66 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Sun, 3 Feb 2019 11:37:34 -0800 Subject: [PATCH] fix Clone impl for Timeout --- actix-utils/src/timeout.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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,