Skip to content

Commit

Permalink
Clippy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MissingNO57 committed Apr 12, 2024
1 parent 65be5d3 commit a769b4c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/crypto/ethereum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ fn parse_eth_signature(signature: &str) -> Result<(u8, Vec<u8>), StdError> {
// extract the recovery code
let mut recovery_code = unpacked_signature
.pop()
.ok_or(signature_error(&"Wrong recovery code"))?;
.ok_or_else(|| signature_error(&"Wrong recovery code"))?;

if recovery_code >= 27u8 {
recovery_code -= 27u8;
}
Expand Down

0 comments on commit a769b4c

Please sign in to comment.