diff --git a/src/span.rs b/src/span.rs index bbdb0b0..afd9d4f 100644 --- a/src/span.rs +++ b/src/span.rs @@ -628,7 +628,7 @@ impl SpanHandle { /// Returns the context of this span. pub fn context(&self) -> Option<&SpanContext> { - self.0.as_ref().map(|&(ref context, _)| context) + self.0.as_ref().map(|(context, _)| context) } /// Gets the baggage item that has the name `name`. @@ -647,7 +647,7 @@ impl SpanHandle { T: Clone, F: FnOnce(StartSpanOptions) -> Span, { - if let Some(&(ref context, ref span_tx)) = self.0.as_ref() { + if let Some((context, span_tx)) = self.0.as_ref() { let options = StartSpanOptions::new(operation_name, span_tx, &AllSampler).child_of(context); f(options) @@ -663,7 +663,7 @@ impl SpanHandle { T: Clone, F: FnOnce(StartSpanOptions) -> Span, { - if let Some(&(ref context, ref span_tx)) = self.0.as_ref() { + if let Some((context, span_tx)) = self.0.as_ref() { let options = StartSpanOptions::new(operation_name, span_tx, &AllSampler).follows_from(context); f(options)