diff --git a/src/main.rs b/src/main.rs index 333c4d4..9fb094b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -25,7 +25,7 @@ impl EventHandler for Handler { #[tokio::main] async fn main() { - let file_path = std::env::var("CONFIG_PATH").unwrap_or("./config.json"); + let file_path = std::env::var("CONFIG_PATH").unwrap_or_else(|| "./config.json".to_string()); println!("reading config from {file_path}"); let file = fs::read_to_string(file_path).unwrap(); let config = serde_json::from_str::(&file).unwrap();