1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-08-30 23:30:19 +02:00

add clone impls for combinator services

This commit is contained in:
Nikolay Kim
2018-09-05 13:54:15 -07:00
parent 8540d81dcf
commit 983223a839
5 changed files with 75 additions and 2 deletions

View File

@@ -25,6 +25,20 @@ where
}
}
impl<A, F, E> Clone for MapErr<A, F, E>
where
A: Service + Clone,
F: Fn(A::Error) -> E + Clone,
{
fn clone(&self) -> Self {
MapErr {
a: self.a.clone(),
f: self.f.clone(),
e: marker::PhantomData,
}
}
}
impl<A, F, E> Service for MapErr<A, F, E>
where
A: Service,