Skip to content

Commit

Permalink
feat(primitives): add some more utility methods to PrimitiveSignature (
Browse files Browse the repository at this point in the history
…#888)

* feat(primitives): add some more utility methods to PrimitiveSignature

Add `normalized_s`, `from_raw`, and simplify existing implementations.

* chore: move
  • Loading branch information
DaniPopes authored Feb 27, 2025
1 parent 047af04 commit 7e11765
Show file tree
Hide file tree
Showing 3 changed files with 175 additions and 155 deletions.
6 changes: 3 additions & 3 deletions crates/primitives/src/signature/error.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use core::convert::Infallible;
use core::{convert::Infallible, fmt};

/// Errors in signature parsing or verification.
#[derive(Debug)]
Expand Down Expand Up @@ -43,8 +43,8 @@ impl core::error::Error for SignatureError {
}
}

impl core::fmt::Display for SignatureError {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
impl fmt::Display for SignatureError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
#[cfg(feature = "k256")]
Self::K256(e) => e.fmt(f),
Expand Down
Loading

0 comments on commit 7e11765

Please sign in to comment.