1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-07-01 12:15:08 +02:00

Don't pull in unneeded dependency on futures (#35)

This commit is contained in:
Riley
2021-09-14 02:12:20 -05:00
committed by GitHub
parent 85ca23f7d2
commit 42ede27123
2 changed files with 3 additions and 5 deletions

View File

@ -1,8 +1,7 @@
use crate::{DefaultRootSpanBuilder, RequestId, RootSpan, RootSpanBuilder};
use actix_web::dev::{Service, ServiceRequest, ServiceResponse, Transform};
use actix_web::{Error, HttpMessage, ResponseError};
use futures::future::{ok, Ready};
use std::future::Future;
use std::future::{ready, Future, Ready};
use std::pin::Pin;
use tracing::Span;
use tracing_futures::Instrument;
@ -100,10 +99,10 @@ where
type Future = Ready<Result<Self::Transform, Self::InitError>>;
fn new_transform(&self, service: S) -> Self::Future {
ok(TracingLoggerMiddleware {
ready(Ok(TracingLoggerMiddleware {
service,
root_span_builder: std::marker::PhantomData::default(),
})
}))
}
}