From 9e019b462ff05315641c95442faf7f8fc80f76b1 Mon Sep 17 00:00:00 2001 From: Mel Date: Tue, 21 Sep 2021 01:04:49 +0200 Subject: Slightly more consistent error handling --- cli/src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cli/src/main.rs') diff --git a/cli/src/main.rs b/cli/src/main.rs index 3105f9a..3b0203d 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -10,18 +10,18 @@ fn main() { match command { "create" => { - create(options).unwrap(); + create(options).expect("Failed executing Create action."); } "update" => { - update(options).unwrap(); + update(options).expect("Failed executing Update action."); } "shift" => { let file_path = args[2].as_str(); let new_cursor: usize = args[3].as_str().parse().expect("Invalid cursor."); - shift(options, file_path, new_cursor).unwrap(); + shift(options, file_path, new_cursor).expect("Failed executing Shift actions."); } - _ => println!("Unknown command: {}", command), + _ => panic!("Unknown command: {}", command), } } -- cgit 1.4.1