Skip to content

Commit

Permalink
Merge pull request #16 from sile/fix-lint-error
Browse files Browse the repository at this point in the history
Fix clippy errors
  • Loading branch information
sile committed Jun 15, 2024
2 parents dd8cf7e + 44dafe8 commit eaf6089
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ impl<T> SpanHandle<T> {

/// Returns the context of this span.
pub fn context(&self) -> Option<&SpanContext<T>> {
self.0.as_ref().map(|&(ref context, _)| context)
self.0.as_ref().map(|(context, _)| context)
}

/// Gets the baggage item that has the name `name`.
Expand All @@ -647,7 +647,7 @@ impl<T> SpanHandle<T> {
T: Clone,
F: FnOnce(StartSpanOptions<AllSampler, T>) -> Span<T>,
{
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)
Expand All @@ -663,7 +663,7 @@ impl<T> SpanHandle<T> {
T: Clone,
F: FnOnce(StartSpanOptions<AllSampler, T>) -> Span<T>,
{
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)
Expand Down

0 comments on commit eaf6089

Please sign in to comment.