Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3774495
D2290.id5771.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D2290.id5771.diff
View Options
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<Route>) -> Box<dyn Service> {
let service = DefaultService {
config: self,
- routes: Box::new(routes),
+ routes,
};
Box::new(service)
@@ -164,7 +164,7 @@
fn into_service(self, routes: Vec<Route>) -> Box<dyn Service> {
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<Vec<Route>>,
+ pub routes: Vec<Route>,
}
#[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<Vec<Route>>,
+ pub routes: Vec<Route>,
}
impl Service for MinimalService {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 12:04 (21 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2262329
Default Alt Text
D2290.id5771.diff (1 KB)
Attached To
Mode
D2290: Avoid Box<Vec<_>>
Attached
Detach File
Event Timeline
Log In to Comment