diff --git a/src/config.rs b/src/config.rs --- a/src/config.rs +++ b/src/config.rs @@ -76,7 +76,7 @@ fn into_service(self, routes: Vec) -> Box { let service = DefaultService { config: self, - routes: Box::new(routes), + routes, }; Box::new(service) @@ -164,7 +164,7 @@ fn into_service(self, routes: Vec) -> Box { let service = MinimalService { config: self, - routes: Box::new(routes), + routes, }; Box::new(service) diff --git a/src/kernel.rs b/src/kernel.rs --- a/src/kernel.rs +++ b/src/kernel.rs @@ -52,7 +52,7 @@ #[cfg(feature = "pgsql")] pub struct DefaultService { pub config: DefaultConfig, - pub routes: Box>, + pub routes: Vec, } #[cfg(feature = "pgsql")] @@ -100,7 +100,7 @@ /// The minimal service allows to spawn a server without any extra feature. pub struct MinimalService { pub config: MinimalConfig, - pub routes: Box>, + pub routes: Vec, } impl Service for MinimalService {