Skip to content
Snippets Groups Projects
Commit d0547ba2 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

fix(#125): fix: clippy

parent ebdc3fcf
No related branches found
No related tags found
No related merge requests found
Pipeline #33599 waiting for manual action
......@@ -29,12 +29,12 @@ pub async fn certify(client: &Client, from: AccountKeyring, to: AccountKeyring)
.storage()
.fetch(&gdev::storage().identity().identity_index_of(&from), None)
.await?
.expect(format!("{} issuer must exist", from.to_string()).as_str());
.unwrap_or_else(|| panic!("{} issuer must exist", from));
let receiver_index = client
.storage()
.fetch(&gdev::storage().identity().identity_index_of(&to), None)
.await?
.expect(format!("{} issuer must exist", from.to_string()).as_str());
.unwrap_or_else(|| panic!("{} issuer must exist", from));
let _events = create_block_with_extrinsic(
client,
......
......@@ -318,10 +318,9 @@ where
.expect("a G1 identity necessarily has a valid pubkey")
})
.unwrap_or_else(|| {
i.owner_address.expect(
format!("neither pubkey nor address is defined for {}", name)
.as_str(),
)
i.owner_address.unwrap_or_else(|| {
panic!("neither pubkey nor address is defined for {}", name)
})
}),
old_owner_key: None,
membership_expire_on: timestamp_to_relative_blocs(
......@@ -458,7 +457,7 @@ where
authority.certs_received.insert(issuer, c);
});
let sk: SessionKeys = SKP::session_keys(&get_authority_keys_from_seed(name.as_str()));
let forced_authority_session_keys = format!("0x{}", hex::encode(sk.encode())).to_string();
let forced_authority_session_keys = format!("0x{}", hex::encode(sk.encode()));
// Add forced authority to smiths (whether explicit smith WoT or clique)
if let Some(smith_identities) = &mut smith_identities {
smith_identities.insert(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment