@@ -235,7 +235,7 @@ impl<P: Config> MerkleTree<P> {
235
235
) -> Result < Self , crate :: Error > {
236
236
// use empty leaf digest
237
237
let leaf_digests = vec ! [ P :: LeafDigest :: default ( ) ; 1 << ( height - 1 ) ] ;
238
- Self :: new_with_leaf_digest ( leaf_hash_param, two_to_one_hash_param, & leaf_digests)
238
+ Self :: new_with_leaf_digest ( leaf_hash_param, two_to_one_hash_param, leaf_digests)
239
239
}
240
240
241
241
/// Returns a new merkle tree. `leaves.len()` should be power of two.
@@ -249,13 +249,13 @@ impl<P: Config> MerkleTree<P> {
249
249
. map ( |input| P :: LeafHash :: evaluate ( leaf_hash_param, input. as_ref ( ) ) )
250
250
. collect :: < Result < Vec < _ > , _ > > ( ) ?;
251
251
252
- Self :: new_with_leaf_digest ( leaf_hash_param, two_to_one_hash_param, & leaf_digests)
252
+ Self :: new_with_leaf_digest ( leaf_hash_param, two_to_one_hash_param, leaf_digests)
253
253
}
254
254
255
255
pub fn new_with_leaf_digest (
256
256
leaf_hash_param : & LeafParam < P > ,
257
257
two_to_one_hash_param : & TwoToOneParam < P > ,
258
- leaf_digests : & [ P :: LeafDigest ] ,
258
+ leaf_digests : Vec < P :: LeafDigest > ,
259
259
) -> Result < Self , crate :: Error > {
260
260
let leaf_nodes_size = leaf_digests. len ( ) ;
261
261
assert ! (
0 commit comments