Skip to content

Commit

Permalink
unwrap -> expect (regerj#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
regerj authored Apr 18, 2024
1 parent 1371326 commit eeb08cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/command_dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub fn add_register_handler(args: AddRegisterArgs) {
.create(false)
.truncate(true)
.open(args.path.clone())
.unwrap();
.expect("Could not open JSON file!");

match file.write_all(serde_json::to_string_pretty(&register_family).unwrap().as_bytes()) {
Ok(_) => {},
Expand All @@ -70,7 +70,7 @@ pub fn bootstrap_handler(args: BootstrapArgs) {
.create(true)
.truncate(true)
.open(args.path.clone())
.unwrap();
.expect("Could not open or create JSON file!");

let reg_family = RegisterFamily {
register_family: args.name.clone(),
Expand Down

0 comments on commit eeb08cb

Please sign in to comment.