diff --git a/ipa-core/src/ff/curve_points.rs b/ipa-core/src/ff/curve_points.rs index 88c2ab5ab..499845f7b 100644 --- a/ipa-core/src/ff/curve_points.rs +++ b/ipa-core/src/ff/curve_points.rs @@ -253,6 +253,6 @@ mod test { // 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF is not a valid Ristretto point let buf: [u8; 32] = unsafe { std::mem::transmute([!ZERO, !ZERO]) }; let err = RP25519::deserialize(GenericArray::from_slice(&buf)).unwrap_err(); - assert!(matches!(err, NonCanonicalEncoding(_))) + assert!(matches!(err, NonCanonicalEncoding(_))); } } diff --git a/ipa-core/src/report.rs b/ipa-core/src/report.rs index 922ce6835..37f8b466b 100644 --- a/ipa-core/src/report.rs +++ b/ipa-core/src/report.rs @@ -13,7 +13,7 @@ use rand_core::{CryptoRng, RngCore}; use typenum::{Unsigned, U1, U18, U8}; use crate::{ - error::{BoxError, Error}, + error::{BoxError, Error, UnwrapInfallible}, ff::{ boolean::Boolean, boolean_array::BA64, GaloisField, Gf40Bit, Gf8Bit, PrimeField, Serializable, @@ -518,7 +518,7 @@ where let match_key = Replicated::::deserialize(GenericArray::from_slice(&buf[..sizeof_matchkey])) - .map_err(|e| Error::ParseError(e.into()))?; + .unwrap_infallible(); let timestamp = Replicated::::deserialize(GenericArray::from_slice( &buf[sizeof_matchkey..sizeof_matchkey + ts_sz], ))