Page MenuHomeDevCentral

D2289.id5769.diff
No OneTemporary

D2289.id5769.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
Sun, Nov 24, 13:11 (10 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2256650
Default Alt Text
D2289.id5769.diff (784 B)

Event Timeline