From 0c7bd12372a8d154341f64b7587a7dafe07f5720 Mon Sep 17 00:00:00 2001 From: Chris Pearce Date: Sun, 7 Apr 2019 18:43:05 +0100 Subject: [PATCH] Fix test failing due to panic --- src/main.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index eca1a039..d4bb64c2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -57,14 +57,11 @@ fn main() { } if let Some(matches) = matches.subcommand_matches("run") { - run(matches.clone()).unwrap(); + run(matches.clone()).unwrap_or_else(|_| std::process::exit(1)); } if matches.subcommand_matches("verify").is_some() { - match verify(None) { - Ok(_) => {} - Err(_) => std::process::exit(1), - } + verify(None).unwrap_or_else(|_| std::process::exit(1)); } if matches.subcommand_matches("watch").is_some() {