Using except rather than unwrap during client init
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user