From 879b115d651b26d3935f5c95d06f426019dedcd3 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 21 Feb 2021 10:12:10 +0530 Subject: remove all instances of view_month_offset --- 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