mirror of
https://github.com/tokio-rs/tracing.git
synced 2025-10-02 07:20:35 +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>
|
impl<M, T, R, G> MakeService<M, T, R, G>
|
||||||
where
|
where
|
||||||
M: tower_util::MakeService<T, R>,
|
|
||||||
G: GetSpan<T>,
|
G: GetSpan<T>,
|
||||||
{
|
{
|
||||||
pub fn new(inner: M, get_span: G) -> Self {
|
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 ===
|
// === impl Service ===
|
||||||
|
Loading…
x
Reference in New Issue
Block a user