diff --git a/k256/src/schnorr.rs b/k256/src/schnorr.rs index 59021ab4..0e94c68b 100644 --- a/k256/src/schnorr.rs +++ b/k256/src/schnorr.rs @@ -145,10 +145,9 @@ impl TryFrom<&[u8]> for Signature { fn try_from(bytes: &[u8]) -> Result { 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() {