Skip to content

Commit

Permalink
cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislearn committed Dec 12, 2023
1 parent eeb672f commit 627ae28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions crates/otel/src/tracing.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use headers03::{HeaderMap, HeaderName, HeaderValue};
use opentelemetry::trace::{FutureExt, Span, SpanKind, TraceContextExt, Tracer};
use opentelemetry::{global, Context};
use opentelemetry_http::HeaderExtractor;
use opentelemetry_semantic_conventions::{resource, trace};
use salvo_core::http::headers::{self, HeaderMapExt};
use salvo_core::prelude::*;
use headers03::{HeaderMap, HeaderName, HeaderValue};

/// Middleware for tracing with OpenTelemetry.
pub struct Tracing<T> {
Expand Down Expand Up @@ -35,8 +35,7 @@ where
(name, value)
}));

let parent_cx =
global::get_text_map_propagator(|propagator| propagator.extract(&HeaderExtractor(&headers)));
let parent_cx = global::get_text_map_propagator(|propagator| propagator.extract(&HeaderExtractor(&headers)));

let mut attributes = Vec::new();
attributes.push(resource::TELEMETRY_SDK_NAME.string(env!("CARGO_CRATE_NAME")));
Expand Down
2 changes: 1 addition & 1 deletion crates/proxy/src/clients.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl super::Client for HyperClient {
return Err(Error::other("upgrade type mismatch"));
}
}
Ok(response.map(|b| ResBody::Hyper(b)))
Ok(response.map(ResBody::Hyper))
}
}

Expand Down

0 comments on commit 627ae28

Please sign in to comment.