mirror of
https://github.com/fafhrd91/actix-web
synced 2025-07-01 16:55:08 +02:00
cleanup deprecation warning for Box<dyn>
This commit is contained in:
@ -119,7 +119,7 @@ where
|
||||
type Request = ServiceRequest;
|
||||
type Response = ServiceResponse<B>;
|
||||
type Error = Error;
|
||||
type Future = Box<Future<Item = Self::Response, Error = Self::Error>>;
|
||||
type Future = Box<dyn Future<Item = Self::Response, Error = Self::Error>>;
|
||||
|
||||
fn poll_ready(&mut self) -> Poll<(), Self::Error> {
|
||||
self.service.poll_ready()
|
||||
|
@ -15,7 +15,7 @@ pub enum ErrorHandlerResponse<B> {
|
||||
/// New http response got generated
|
||||
Response(ServiceResponse<B>),
|
||||
/// Result is a future that resolves to a new http response
|
||||
Future(Box<Future<Item = ServiceResponse<B>, Error = Error>>),
|
||||
Future(Box<dyn Future<Item = ServiceResponse<B>, Error = Error>>),
|
||||
}
|
||||
|
||||
type ErrorHandler<B> = Fn(ServiceResponse<B>) -> Result<ErrorHandlerResponse<B>>;
|
||||
@ -117,7 +117,7 @@ where
|
||||
type Request = ServiceRequest;
|
||||
type Response = ServiceResponse<B>;
|
||||
type Error = Error;
|
||||
type Future = Box<Future<Item = Self::Response, Error = Self::Error>>;
|
||||
type Future = Box<dyn Future<Item = Self::Response, Error = Self::Error>>;
|
||||
|
||||
fn poll_ready(&mut self) -> Poll<(), Self::Error> {
|
||||
self.service.poll_ready()
|
||||
|
Reference in New Issue
Block a user