Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
core/src/identity/ecdsa: Fix clippy warning
  • Loading branch information
mxinden committed Nov 30, 2021
commit deaa48a1277e6ac03b689c7f79ce70edc8cf54c3
6 changes: 3 additions & 3 deletions core/src/identity/ecdsa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ impl PublicKey {

/// Decode a public key into a DER encoded byte buffer as defined by SEC1 standard.
pub fn decode_der(k: &[u8]) -> Result<PublicKey, DecodingError> {
let buf = Self::del_asn1_header(k).ok_or(DecodingError::new(
"failed to parse asn.1 encoded ecdsa p256 public key",
))?;
let buf = Self::del_asn1_header(k).ok_or_else(|| {
DecodingError::new("failed to parse asn.1 encoded ecdsa p256 public key")
})?;
Self::from_bytes(&buf)
}

Expand Down