From 02a0b59eb65629bb07335f87fdd6d8ce4df0f956 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 13 Jul 2020 09:37:52 -0400 Subject: [PATCH] Using a static for CONFIG_FILE again. --- server/lemmy_utils/src/settings.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/lemmy_utils/src/settings.rs b/server/lemmy_utils/src/settings.rs index a710b3323..bf3fe5c12 100644 --- a/server/lemmy_utils/src/settings.rs +++ b/server/lemmy_utils/src/settings.rs @@ -4,6 +4,7 @@ use std::{fs, io::Error, net::IpAddr, sync::RwLock}; use std::env; static CONFIG_FILE_DEFAULTS: &str = "config/defaults.hjson"; +static CONFIG_FILE: &str = "config/config.hjson"; #[derive(Debug, Deserialize, Clone)] pub struct Settings { @@ -116,7 +117,7 @@ impl Settings { } pub fn get_config_location() -> String { - env::var("LEMMY_CONFIG_LOCATION").unwrap_or("config/config.hjson".to_string()) + env::var("LEMMY_CONFIG_LOCATION").unwrap_or(CONFIG_FILE.to_string()) } pub fn read_config_file() -> Result {