Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3763420
D2289.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
784 B
Referenced Files
None
Subscribers
None
D2289.diff
View Options
diff --git a/src/config.rs b/src/config.rs
--- a/src/config.rs
+++ b/src/config.rs
@@ -104,7 +104,8 @@
}
};
- let entry_point = env::var("API_ENTRY_POINT").unwrap_or(String::from("/"));
+ let entry_point = env::var("API_ENTRY_POINT")
+ .unwrap_or_else(|_| String::from("/"));
let database_pool_size = match env::var("DATABASE_POOL_SIZE") {
Ok(variable) => {
@@ -177,7 +178,8 @@
warn!(target: "config", "Can't parse .env: {}", error);
};
- let entry_point = env::var("API_ENTRY_POINT").unwrap_or(String::from("/"));
+ let entry_point = env::var("API_ENTRY_POINT")
+ .unwrap_or_else(|_| String::from("/"));
Ok(MinimalConfig {
entry_point,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 22, 23:33 (16 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2256650
Default Alt Text
D2289.diff (784 B)
Attached To
Mode
D2289: Lazy evaluate default values
Attached
Detach File
Event Timeline
Log In to Comment