From 536515abd5509fa6c9af49ca87ce012f2f36a582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=A8Jeff?= <¨burdges@gnunet.org¨> Date: Tue, 19 Sep 2023 16:25:38 -0400 Subject: [PATCH] Oops not sure why these never ran locally. --- ff/src/fields/field_hashers/expander/tests.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ff/src/fields/field_hashers/expander/tests.rs b/ff/src/fields/field_hashers/expander/tests.rs index 36b4190f9..8cab0203c 100644 --- a/ff/src/fields/field_hashers/expander/tests.rs +++ b/ff/src/fields/field_hashers/expander/tests.rs @@ -1,3 +1,4 @@ + use libtest_mimic::{run, Arguments, Failed, Trial}; use sha2::{Sha256, Sha384, Sha512}; @@ -5,6 +6,7 @@ use sha3::{Shake128, Shake256}; use std::{ fs::{read_dir, File}, io::BufReader, + marker::PhantomData, }; use super::{Expander, ExpanderXmd, ExpanderXof}; @@ -99,29 +101,29 @@ fn get_expander(id: ExpID, _dst: &[u8], k: usize) -> Box { match id { ExpID::XMD(h) => match h { HashID::SHA256 => Box::new(ExpanderXmd { - hasher: Sha256::default(), + hasher: PhantomData::, block_size: 64, dst, }), HashID::SHA384 => Box::new(ExpanderXmd { - hasher: Sha384::default(), + hasher: PhantomData::, block_size: 128, dst, }), HashID::SHA512 => Box::new(ExpanderXmd { - hasher: Sha512::default(), + hasher: PhantomData::, block_size: 128, dst, }), }, ExpID::XOF(x) => match x { XofID::SHAKE128 => Box::new(ExpanderXof { - xofer: Shake128::default(), + xofer: PhantomData::, k, dst, }), XofID::SHAKE256 => Box::new(ExpanderXof { - xofer: Shake256::default(), + xofer: PhantomData::, k, dst, }),