diff --git a/src/math.rs b/src/math.rs index 2151033..ee69252 100644 --- a/src/math.rs +++ b/src/math.rs @@ -79,7 +79,7 @@ mod tests { #[test] fn evaluator_works() { let iter = get_evaluator(vec![vec![GF256(3), GF256(2), GF256(5)]]); - let values: Vec<_> = iter.take(2).map(|s| (s.x, s.y)).collect(); + let values: Vec<_> = iter.take(2).map(|s| (s.x.clone(), s.y.clone())).collect(); assert_eq!( values, vec![(GF256(1), vec![GF256(4)]), (GF256(2), vec![GF256(13)])] diff --git a/src/share.rs b/src/share.rs index 6135794..c9d1592 100644 --- a/src/share.rs +++ b/src/share.rs @@ -35,6 +35,7 @@ use zeroize::Zeroize; #[derive(Clone)] #[cfg_attr(feature = "fuzzing", derive(Arbitrary, Debug))] #[cfg_attr(feature = "zeroize_memory", derive(Zeroize))] +#[cfg_attr(feature = "zeroize_memory", zeroize(drop))] pub struct Share { pub x: GF256, pub y: Vec,