diff --git a/tests/test_error_propagation.rs b/tests/test_error_propagation.rs index 82bfbb049..1b56615a0 100644 --- a/tests/test_error_propagation.rs +++ b/tests/test_error_propagation.rs @@ -1,12 +1,12 @@ +use actix_utils::future::{ok, Ready}; use actix_web::dev::{Service, ServiceRequest, ServiceResponse, Transform}; use actix_web::test::{call_service, init_service, TestRequest}; use actix_web::{HttpResponse, ResponseError}; +use futures_util::lock::Mutex; use std::future::Future; use std::pin::Pin; use std::sync::Arc; use std::task::{Context, Poll}; -use futures_util::lock::Mutex; -use actix_utils::future::{ok, Ready}; #[derive(Debug, Clone)] pub struct MyError; @@ -29,10 +29,10 @@ async fn test() -> Result { pub struct SpyMiddleware(Arc>>); impl Transform for SpyMiddleware - where - S: Service, Error = actix_web::Error>, - S::Future: 'static, - B: 'static, +where + S: Service, Error = actix_web::Error>, + S::Future: 'static, + B: 'static, { type Response = ServiceResponse; type Error = actix_web::Error; @@ -55,10 +55,10 @@ pub struct Middleware { } impl Service for Middleware - where - S: Service, Error = actix_web::Error>, - S::Future: 'static, - B: 'static, +where + S: Service, Error = actix_web::Error>, + S::Future: 'static, + B: 'static, { type Response = ServiceResponse; type Error = actix_web::Error; @@ -91,7 +91,7 @@ async fn error_cause_should_be_propagated_to_middlewares() { .wrap(spy_middleware.clone()) .service(test), ) - .await; + .await; call_service(&app, TestRequest::with_uri("/test").to_request()).await;