diff options
author | Till Hoeppner | 2014-11-26 23:27:57 +0100 |
---|---|---|
committer | Till Hoeppner | 2014-11-26 23:27:57 +0100 |
commit | ca5a2b6e222ff556b8bcab4f20ec9fecc4e81bc9 (patch) | |
tree | 7f5fbdf0ba055bf066902fcef27c2a7ccad53f6f /src | |
parent | ae2651ee86f604757b5474dee8b343d28f0fce75 (diff) | |
download | sersve-ca5a2b6e222ff556b8bcab4f20ec9fecc4e81bc9.tar.gz sersve-ca5a2b6e222ff556b8bcab4f20ec9fecc4e81bc9.tar.xz sersve-ca5a2b6e222ff556b8bcab4f20ec9fecc4e81bc9.zip |
Change defaults, errors and build setup
Diffstat (limited to 'src')
-rw-r--r-- | src/sersve.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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.") |