From a66fecf020aa681fc1f5b1b50f42b501bd20c415 Mon Sep 17 00:00:00 2001 From: P G Nithin Reddy Date: Sun, 24 Jan 2021 21:12:33 +0530 Subject: [PATCH] Update actix_web to 4.0 (#7) --- Cargo.toml | 2 +- src/lib.rs | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) 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>>>;