diff options
| author | Mel <einebeere@gmail.com> | 2021-09-21 01:04:49 +0200 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2021-09-21 01:05:03 +0200 |
| commit | 9e019b462ff05315641c95442faf7f8fc80f76b1 (patch) | |
| tree | 5813c85887544d865542fb122882a1fb9d2be718 /cli/src/main.rs | |
| parent | c25d22681f9bc6ddba512895182af0ce0252731b (diff) | |
| download | ka-9e019b462ff05315641c95442faf7f8fc80f76b1.tar.zst ka-9e019b462ff05315641c95442faf7f8fc80f76b1.zip | |
Slightly more consistent error handling
Diffstat (limited to 'cli/src/main.rs')
| -rw-r--r-- | cli/src/main.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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), } } |
