tower: impl Clone for service_span::MakeService (#211)

## Motivation

The `MakeService` type in `tracing_tower::service_span` was 
missing a `Clone` implementation.

## Solution

This PR adds the missing `Clone` impl.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
This commit is contained in:
Eliza Weisman 2019-07-23 12:51:55 -07:00 committed by GitHub
parent 7fbb8a7621
commit 7e1e424e6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -183,7 +183,6 @@ pub mod make {
impl<M, T, R, G> MakeService<M, T, R, G>
where
M: tower_util::MakeService<T, R>,
G: GetSpan<T>,
{
pub fn new(inner: M, get_span: G) -> Self {
@ -194,6 +193,16 @@ pub mod make {
}
}
}
impl<M, T, R, G> Clone for MakeService<M, T, R, G>
where
M: Clone,
G: GetSpan<T> + Clone,
{
fn clone(&self) -> Self {
Self::new(self.inner.clone(), self.get_span.clone())
}
}
}
// === impl Service ===