Browse Source

Replace Box<Trait> with Box<dyn Trait> in Actix (#5291)

This resolves depreciation warnings.
Konrad Borowski 5 years ago
parent
commit
6506f14912
1 changed files with 2 additions and 2 deletions
  1. 2 2
      frameworks/Rust/actix/src/main_platform.rs

+ 2 - 2
frameworks/Rust/actix/src/main_platform.rs

@@ -37,7 +37,7 @@ impl Service for App {
     type Request = Request;
     type Response = Response;
     type Error = Error;
-    type Future = Box<Future<Item = Response, Error = Error>>;
+    type Future = Box<dyn Future<Item = Response, Error = Error>>;
 
     #[inline]
     fn poll_ready(&mut self) -> Poll<(), Self::Error> {
@@ -122,7 +122,7 @@ impl NewService for AppFactory {
     type Error = Error;
     type Service = App;
     type InitError = ();
-    type Future = Box<Future<Item = Self::Service, Error = Self::InitError>>;
+    type Future = Box<dyn Future<Item = Self::Service, Error = Self::InitError>>;
 
     fn new_service(&self, _: &ServerConfig) -> Self::Future {
         const DB_URL: &str =