This commit is contained in:
nora 2022-02-25 15:33:03 +01:00 committed by GitHub
parent 97fe43138a
commit 43063e600f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,7 +25,7 @@ impl EventHandler for Handler {
#[tokio::main] #[tokio::main]
async fn main() { async fn main() {
let file_path = std::env::var("CONFIG_PATH").unwrap_or_else(|| "./config.json".to_string()); let file_path = std::env::var("CONFIG_PATH").unwrap_or_else(|_| "./config.json".to_string());
println!("reading config from {file_path}"); println!("reading config from {file_path}");
let file = fs::read_to_string(file_path).unwrap(); let file = fs::read_to_string(file_path).unwrap();
let config = serde_json::from_str::<ConfigFile>(&file).unwrap(); let config = serde_json::from_str::<ConfigFile>(&file).unwrap();