Skip to content

Commit

Permalink
rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
tarcieri committed Jan 10, 2024
1 parent 1155a42 commit ee6d1b3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions k256/src/schnorr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,9 @@ impl TryFrom<&[u8]> for Signature {
fn try_from(bytes: &[u8]) -> Result<Signature> {
let (r_bytes, s_bytes) = bytes.split_at(Self::BYTE_SIZE / 2);

let r: FieldElement = Option::from(FieldElement::from_bytes(FieldBytes::from_slice(
r_bytes,
)))
.ok_or_else(Error::new)?;
let r: FieldElement =
Option::from(FieldElement::from_bytes(FieldBytes::from_slice(r_bytes)))
.ok_or_else(Error::new)?;

// one of the rules for valid signatures: !is_infinite(R);
if r.is_zero().into() {
Expand Down

0 comments on commit ee6d1b3

Please sign in to comment.