Formatting

This commit is contained in:
Luca Palmieri 2021-06-22 18:26:52 +02:00
parent 66d9ab1be2
commit 176d7fd8dd
1 changed files with 11 additions and 11 deletions

View File

@ -1,12 +1,12 @@
use actix_utils::future::{ok, Ready};
use actix_web::dev::{Service, ServiceRequest, ServiceResponse, Transform}; use actix_web::dev::{Service, ServiceRequest, ServiceResponse, Transform};
use actix_web::test::{call_service, init_service, TestRequest}; use actix_web::test::{call_service, init_service, TestRequest};
use actix_web::{HttpResponse, ResponseError}; use actix_web::{HttpResponse, ResponseError};
use futures_util::lock::Mutex;
use std::future::Future; use std::future::Future;
use std::pin::Pin; use std::pin::Pin;
use std::sync::Arc; use std::sync::Arc;
use std::task::{Context, Poll}; use std::task::{Context, Poll};
use futures_util::lock::Mutex;
use actix_utils::future::{ok, Ready};
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct MyError; pub struct MyError;
@ -29,7 +29,7 @@ async fn test() -> Result<actix_web::HttpResponse, actix_web::error::Error> {
pub struct SpyMiddleware(Arc<Mutex<Option<bool>>>); pub struct SpyMiddleware(Arc<Mutex<Option<bool>>>);
impl<S, B> Transform<S, ServiceRequest> for SpyMiddleware impl<S, B> Transform<S, ServiceRequest> for SpyMiddleware
where where
S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = actix_web::Error>, S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = actix_web::Error>,
S::Future: 'static, S::Future: 'static,
B: 'static, B: 'static,
@ -55,7 +55,7 @@ pub struct Middleware<S> {
} }
impl<S, B> Service<ServiceRequest> for Middleware<S> impl<S, B> Service<ServiceRequest> for Middleware<S>
where where
S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = actix_web::Error>, S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = actix_web::Error>,
S::Future: 'static, S::Future: 'static,
B: 'static, B: 'static,