From 0dc31c65c64835a5ffac9df72327f3cc04e6d6fc Mon Sep 17 00:00:00 2001 From: Lionel Sambuc Date: Mon, 20 Jan 2020 14:50:14 +0100 Subject: [PATCH] Remove some .unwrap() calls. The parser still contains three calls to `unwrap()`, but a this point I have not yet figured out how to remove them. --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index f8fce1b..dd66b16 100644 --- a/src/main.rs +++ b/src/main.rs @@ -26,7 +26,8 @@ fn main() { let db; { info_time!("Loading database index"); - db = DataBase::load(&[&format!("{}.index", core)]).unwrap(); + db = DataBase::load(&[&format!("{}.index", core)]) + .unwrap_or_else(|e| panic!("Unable to load database '{}': {}", core, e)); } let parameters = CoreQueryParameters {