1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-02-22 18:33:18 +01:00

Update actix_web to 4.0 (#7)

This commit is contained in:
P G Nithin Reddy 2021-01-24 21:12:33 +05:30 committed by GitHub
parent cae596811d
commit a66fecf020
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 7 deletions

View File

@ -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"

View File

@ -89,13 +89,12 @@ use uuid::Uuid;
/// [`tracing`]: https://docs.rs/tracing
pub struct TracingLogger;
impl<S, B> Transform<S> for TracingLogger
impl<S, B> Transform<S, ServiceRequest> for TracingLogger
where
S: Service<Request = ServiceRequest, Response = ServiceResponse<B>, Error = Error>,
S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = Error>,
S::Future: 'static,
B: 'static,
{
type Request = ServiceRequest;
type Response = ServiceResponse<B>;
type Error = Error;
type Transform = TracingLoggerMiddleware<S>;
@ -158,13 +157,12 @@ impl std::fmt::Display for RequestId {
}
}
impl<S, B> Service for TracingLoggerMiddleware<S>
impl<S, B> Service<ServiceRequest> for TracingLoggerMiddleware<S>
where
S: Service<Request = ServiceRequest, Response = ServiceResponse<B>, Error = Error>,
S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = Error>,
S::Future: 'static,
B: 'static,
{
type Request = ServiceRequest;
type Response = ServiceResponse<B>;
type Error = Error;
type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>>>>;