Page MenuHomeDevCentral

D2289.id5876.diff
No OneTemporary

D2289.id5876.diff

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

Mime Type
text/plain
Expires
Sat, Nov 23, 06:20 (17 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2256650
Default Alt Text
D2289.id5876.diff (784 B)

Event Timeline