Skip to content

Commit

Permalink
fix: style
Browse files Browse the repository at this point in the history
  • Loading branch information
przydatek committed Feb 3, 2025
1 parent 395950a commit c93113b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions canisters/test-client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ pub struct ClientInit {
#[init]
fn init(init_arg: Option<ClientInit>) {
if let Some(init) = init_arg {
cns_client::override_cns_root_for_testing(Principal::from_text(&init.cns_root_cid).expect(
&format!("Failed parsing init CNS root CID: {}", init.cns_root_cid),
));
cns_client::override_cns_root_for_testing(
Principal::from_text(&init.cns_root_cid).unwrap_or_else(|_| {
panic!("Failed parsing init CNS root CID: {}", init.cns_root_cid)
}),
);
};
}

Expand Down

0 comments on commit c93113b

Please sign in to comment.