diff --git a/Cargo.toml b/Cargo.toml index 4b34f4cb1..f60542a70 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ keywords = ["http", "actix-web", "tracing", "logging"] categories = ["asynchronous", "web-programming"] [dependencies] -actix-web = "3" +actix-web = "4.0.0-beta.1" tracing = "0.1.19" tracing-futures = "0.2.4" futures = "0.3.5" diff --git a/src/lib.rs b/src/lib.rs index c091139cd..b39d1a7e7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -89,13 +89,12 @@ use uuid::Uuid; /// [`tracing`]: https://docs.rs/tracing pub struct TracingLogger; -impl Transform for TracingLogger +impl Transform for TracingLogger where - S: Service, Error = Error>, + S: Service, Error = Error>, S::Future: 'static, B: 'static, { - type Request = ServiceRequest; type Response = ServiceResponse; type Error = Error; type Transform = TracingLoggerMiddleware; @@ -158,13 +157,12 @@ impl std::fmt::Display for RequestId { } } -impl Service for TracingLoggerMiddleware +impl Service for TracingLoggerMiddleware where - S: Service, Error = Error>, + S: Service, Error = Error>, S::Future: 'static, B: 'static, { - type Request = ServiceRequest; type Response = ServiceResponse; type Error = Error; type Future = Pin>>>;