From 53f7a679a0cf7a510de13d67cf370988f71c0d08 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sat, 6 Feb 2021 19:00:40 +0530 Subject: deprecate view_month_offset in favor of cursor --- src/utils.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/utils.rs') diff --git a/src/utils.rs b/src/utils.rs index 2453aa6..f5a25c8 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -102,12 +102,12 @@ pub fn load_configuration_file() -> AppConfig { if let Ok(ref mut f) = File::open(&cf) { let mut j = String::new(); f.read_to_string(&mut j); - return toml::from_str(&j).unwrap(); + return toml::from_str(&j).unwrap_or_else(|e| panic!("Invalid config file: `{}`", e)); } else { if let Ok(dc) = toml::to_string(&AppConfig::default()) { match OpenOptions::new().create(true).write(true).open(&cf) { Ok(ref mut file) => file.write(dc.as_bytes()).unwrap(), - Err(_) => 0, + Err(_) => panic!("Unable to write config file to disk!"), }; } return Default::default(); -- cgit v1.2.3