mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-23 22:51:07 +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};
|
||||
|
||||
/// Applies a timeout to requests.
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug)]
|
||||
pub struct Timeout<E = ()> {
|
||||
timeout: Duration,
|
||||
_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>
|
||||
where
|
||||
S: Service,
|
||||
|
Loading…
Reference in New Issue
Block a user