mirror of
https://github.com/actix/actix-extras.git
synced 2025-02-23 10:53:02 +01:00
Fix linter errors.
This commit is contained in:
parent
d7ffa0aac8
commit
a83919a719
@ -28,16 +28,12 @@
|
||||
//! use actix_web::{App, web, HttpServer};
|
||||
//! use tracing_actix_web::TracingLogger;
|
||||
//!
|
||||
//! fn main() {
|
||||
//! // Init your `tracing` subscriber here!
|
||||
//!
|
||||
//! let server = HttpServer::new(|| {
|
||||
//! App::new()
|
||||
//! // Mount `TracingLogger` as a middleware
|
||||
//! .wrap(TracingLogger::default())
|
||||
//! .service( /* */ )
|
||||
//! });
|
||||
//! }
|
||||
//! ```
|
||||
//!
|
||||
//! Check out [the examples on GitHub](https://github.com/LukeMathWalker/tracing-actix-web/tree/main/examples) to get a taste of how [`TracingLogger`] can be used to observe and monitor your
|
||||
|
@ -113,6 +113,7 @@ pub struct TracingLoggerMiddleware<S, RootSpanBuilder> {
|
||||
root_span_builder: std::marker::PhantomData<RootSpanBuilder>,
|
||||
}
|
||||
|
||||
#[allow(clippy::type_complexity)]
|
||||
impl<S, B, RootSpanType> Service<ServiceRequest> for TracingLoggerMiddleware<S, RootSpanType>
|
||||
where
|
||||
S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = Error>,
|
||||
|
@ -42,9 +42,9 @@ impl std::ops::Deref for RequestId {
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::Into<Uuid> for RequestId {
|
||||
fn into(self) -> Uuid {
|
||||
self.0
|
||||
impl From<RequestId> for Uuid {
|
||||
fn from(r: RequestId) -> Self {
|
||||
r.0
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,10 +53,11 @@ impl std::fmt::Display for RequestId {
|
||||
write!(f, "{}", self.0)
|
||||
}
|
||||
}
|
||||
|
||||
impl FromRequest for RequestId {
|
||||
type Config = ();
|
||||
type Error = RequestIdExtractionError;
|
||||
type Future = Ready<Result<Self, Self::Error>>;
|
||||
type Config = ();
|
||||
|
||||
fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future {
|
||||
ready(
|
||||
|
@ -40,16 +40,16 @@ impl std::ops::Deref for RootSpan {
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::Into<Span> for RootSpan {
|
||||
fn into(self) -> Span {
|
||||
self.0
|
||||
impl From<RootSpan> for Span {
|
||||
fn from(r: RootSpan) -> Self {
|
||||
r.0
|
||||
}
|
||||
}
|
||||
|
||||
impl FromRequest for RootSpan {
|
||||
type Config = ();
|
||||
type Error = RootSpanExtractionError;
|
||||
type Future = Ready<Result<Self, Self::Error>>;
|
||||
type Config = ();
|
||||
|
||||
fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future {
|
||||
ready(
|
||||
|
Loading…
x
Reference in New Issue
Block a user