};
use anyhow::{anyhow, Context};
use deser_hjson::from_str;
-use log::warn;
use merge::Merge;
use std::{env, fs, io::Error, net::IpAddr, sync::RwLock};
static CONFIG_FILE: &str = "config/config.hjson";
lazy_static! {
- static ref SETTINGS: RwLock<Settings> = RwLock::new(match Settings::init() {
- Ok(c) => c,
- Err(e) => {
- warn!(
- "Couldn't load settings file, using default settings.\n{}",
- e
- );
- Settings::default()
- }
- });
+ static ref SETTINGS: RwLock<Settings> =
+ RwLock::new(Settings::init().expect("Failed to load settings file"));
}
impl Settings {