diff --git a/plonky2x/src/frontend/hash/keccak/mod.rs b/plonky2x/src/frontend/hash/keccak/mod.rs index 1bbf5a32b..cec347fb4 100644 --- a/plonky2x/src/frontend/hash/keccak/mod.rs +++ b/plonky2x/src/frontend/hash/keccak/mod.rs @@ -18,7 +18,7 @@ impl, const D: usize> CircuitBuilder { _phantom: PhantomData::, }; let output = generator.output; - self.add_simple_generator(generator.clone()); + self.add_simple_generator(generator); output } @@ -33,7 +33,7 @@ impl, const D: usize> CircuitBuilder { length: Some(length), _phantom: PhantomData::, }; - self.add_simple_generator(generator.clone()); + self.add_simple_generator(generator); generator.output } } diff --git a/plonky2x/src/frontend/merkle/tendermint.rs b/plonky2x/src/frontend/merkle/tendermint.rs index ef862d501..7a01f6656 100644 --- a/plonky2x/src/frontend/merkle/tendermint.rs +++ b/plonky2x/src/frontend/merkle/tendermint.rs @@ -113,7 +113,7 @@ impl, const D: usize> CircuitBuilder { pub fn hash_leaves( &mut self, - leaves: &Vec>, + leaves: Vec>, ) -> Vec { leaves .iter() @@ -123,8 +123,8 @@ impl, const D: usize> CircuitBuilder { pub fn get_root_from_hashed_leaves( &mut self, - leaf_hashes: &Vec, - leaves_enabled: &Vec, + leaf_hashes: Vec, + leaves_enabled: Vec, ) -> Bytes32Variable { assert!(NB_LEAVES.is_power_of_two()); @@ -149,14 +149,14 @@ impl, const D: usize> CircuitBuilder { pub fn compute_root_from_leaves( &mut self, - leaves: &Vec>, - leaves_enabled: &Vec, + leaves: Vec>, + leaves_enabled: Vec, ) -> Bytes32Variable { // TODO: Remove, this is just for debugging. assert_eq!(leaves.len(), NB_LEAVES); let hashed_leaves = self.hash_leaves::(leaves); - self.get_root_from_hashed_leaves::(&hashed_leaves, leaves_enabled) + self.get_root_from_hashed_leaves::(hashed_leaves, leaves_enabled) } } @@ -187,7 +187,7 @@ mod tests { let leaves = builder.read::, 32>>(); let enabled = builder.read::>(); - let root = builder.compute_root_from_leaves::<32, 48>(&leaves.as_vec(), &enabled.as_vec()); + let root = builder.compute_root_from_leaves::<32, 48>(leaves.as_vec(), enabled.as_vec()); builder.write::(root); let circuit = builder.build(); circuit.test_default_serializers();