diff --git a/utoipa-actix-web/src/scope.rs b/utoipa-actix-web/src/scope.rs index 945d3ab7..0efdf7b0 100644 --- a/utoipa-actix-web/src/scope.rs +++ b/utoipa-actix-web/src/scope.rs @@ -98,9 +98,26 @@ where } /// Passthrough implementation for [`actix_web::Scope::wrap`]. - pub fn wrap(self, middleware: M) -> Scope, Error = Error, InitError = ()>> + pub fn wrap( + self, + middleware: M, + ) -> Scope< + impl ServiceFactory< + ServiceRequest, + Config = (), + Response = ServiceResponse, + Error = Error, + InitError = (), + >, + > where - M: Transform, Error = Error, InitError = ()> + 'static, + M: Transform< + T::Service, + ServiceRequest, + Response = ServiceResponse, + Error = Error, + InitError = () + > + 'static, B: MessageBody, { let scope = self.0.wrap(middleware);