From ca5a2b6e222ff556b8bcab4f20ec9fecc4e81bc9 Mon Sep 17 00:00:00 2001 From: Till Hoeppner Date: Wed, 26 Nov 2014 23:27:57 +0100 Subject: Change defaults, errors and build setup --- src/sersve.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/sersve.rs b/src/sersve.rs index 1d6e91c..a38a44a 100644 --- a/src/sersve.rs +++ b/src/sersve.rs @@ -196,7 +196,7 @@ fn main() { matches.opt_str("c").map(|conf_file| { let conf_file = File::open(&Path::new(conf_file)); - //conf_file.map_err(|e| panic!("{}", e.desc)); + conf_file.as_ref().map_err::<()>(|e| panic!("{}", e.desc)).unwrap(); let json = match json::from_reader(&mut conf_file.ok().unwrap()) { Ok(Json::Object(o)) => o, _ => panic!("Invalid configuration file. Doesn't contain top-level object.") -- cgit v1.2.3