From 09ac19fb45ee082b0bd6b78d5fb41dae344c0752 Mon Sep 17 00:00:00 2001 From: Jedrzej Stuczynski Date: Fri, 31 Jan 2020 10:04:10 +0000 Subject: [PATCH] Using except rather than unwrap during client init --- nym-client/src/commands/init.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nym-client/src/commands/init.rs b/nym-client/src/commands/init.rs index a957fe7722..6888de474e 100644 --- a/nym-client/src/commands/init.rs +++ b/nym-client/src/commands/init.rs @@ -18,11 +18,15 @@ pub fn execute(matches: &ArgMatches) { let pathfinder = ClientPathfinder::new_from_config(&config); let pem_store = PemStore::new(pathfinder); - pem_store.write_identity(mix_identity_keys).unwrap(); + pem_store + .write_identity(mix_identity_keys) + .expect("Failed to save identity keys"); println!("Saved mixnet identity keypair"); let config_save_location = config.get_config_file_save_location(); - config.save_to_file(None).unwrap(); + config + .save_to_file(None) + .expect("Failed to save the config file"); println!("Saved configuration file to {:?}", config_save_location); println!("Client configuration completed.\n\n\n") }