Skip to content

Commit

Permalink
More minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
akoshelev committed Dec 22, 2023
1 parent 1ba7eb3 commit 4d3f082
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ipa-core/src/ff/curve_points.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(_)));
}
}
4 changes: 2 additions & 2 deletions ipa-core/src/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -518,7 +518,7 @@ where

let match_key =
Replicated::<BA64>::deserialize(GenericArray::from_slice(&buf[..sizeof_matchkey]))
.map_err(|e| Error::ParseError(e.into()))?;
.unwrap_infallible();
let timestamp = Replicated::<TS>::deserialize(GenericArray::from_slice(
&buf[sizeof_matchkey..sizeof_matchkey + ts_sz],
))
Expand Down

0 comments on commit 4d3f082

Please sign in to comment.