mirror of
https://github.com/tokio-rs/tracing.git
synced 2025-09-30 14:30:42 +00:00
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:
parent
7fbb8a7621
commit
7e1e424e6f
@ -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 ===
|
||||
|
Loading…
x
Reference in New Issue
Block a user