Skip to content

Commit 7ab3a94

Browse files
Fix clippy warnings.
1 parent 6991c67 commit 7ab3a94

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

crates/dids/methods/pkh/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,13 +339,12 @@ async fn resolve_bip122(did: &DID, account_address: &str, reference: &str) -> Re
339339
));
340340
}
341341
}
342-
REFERENCE_BIP122_DOGECOIN_MAINNET => {
343-
if !account_address.starts_with('D') {
342+
REFERENCE_BIP122_DOGECOIN_MAINNET
343+
if !account_address.starts_with('D') => {
344344
return Err(Error::InvalidMethodSpecificId(
345345
did.method_specific_id().to_owned(),
346346
));
347347
}
348-
}
349348
_ => {
350349
// Unknown network address: no prefix hash check
351350
}

crates/eip712/src/encode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ impl TypeDefinition {
252252
let mut referenced_types = HashMap::new();
253253
gather_referenced_struct_types(self, types, &mut referenced_types)?;
254254
let mut types: Vec<(&String, &TypeDefinition)> = referenced_types.into_iter().collect();
255-
types.sort_by(|(name1, _), (name2, _)| name1.cmp(name2));
255+
types.sort_by_key(|(name1, _)| *name1);
256256
for (name, type_) in types {
257257
encode_type_single(name, type_, &mut string);
258258
}

0 commit comments

Comments
 (0)