Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elliptic-curve: fix build failure on nightly #1589

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions elliptic-curve/src/hash2curve/hash2field/expand_msg/xmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ where
#[cfg(test)]
mod test {
use super::*;
use core::mem;
use core::mem::size_of;
use hex_literal::hex;
use hybrid_array::{
typenum::{U128, U32},
Expand All @@ -177,16 +177,16 @@ mod test {
let msg_len = block + msg.len();
assert_eq!(msg, &bytes[block..msg_len]);

let l = msg_len + mem::size_of::<u16>();
let l = msg_len + size_of::<u16>();
assert_eq!(len_in_bytes.to_be_bytes(), &bytes[msg_len..l]);

let pad = l + mem::size_of::<u8>();
let pad = l + size_of::<u8>();
assert_eq!([0], &bytes[l..pad]);

let dst = pad + usize::from(domain.len());
domain.assert(&bytes[pad..dst]);

let dst_len = dst + mem::size_of::<u8>();
let dst_len = dst + size_of::<u8>();
assert_eq!([domain.len()], &bytes[dst..dst_len]);

assert_eq!(dst_len, bytes.len());
Expand Down
6 changes: 3 additions & 3 deletions elliptic-curve/src/hash2curve/hash2field/expand_msg/xof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ where
#[cfg(test)]
mod test {
use super::*;
use core::mem;
use core::mem::size_of;
use hex_literal::hex;
use hybrid_array::{typenum::U128, Array, ArraySize};
use sha3::Shake128;
Expand All @@ -72,7 +72,7 @@ mod test {
let msg_len = msg.len();
assert_eq!(msg, &bytes[..msg_len]);

let len_in_bytes_len = msg_len + mem::size_of::<u16>();
let len_in_bytes_len = msg_len + size_of::<u16>();
assert_eq!(
len_in_bytes.to_be_bytes(),
&bytes[msg_len..len_in_bytes_len]
Expand All @@ -81,7 +81,7 @@ mod test {
let dst = len_in_bytes_len + usize::from(domain.len());
domain.assert(&bytes[len_in_bytes_len..dst]);

let dst_len = dst + mem::size_of::<u8>();
let dst_len = dst + size_of::<u8>();
assert_eq!([domain.len()], &bytes[dst..dst_len]);

assert_eq!(dst_len, bytes.len());
Expand Down
Loading