@@ -366,19 +366,14 @@ impl AccumulatorDiff {
366366 }
367367 }
368368
369+ /// Returns the number of tracked insertions and deletions, in that order.
369370 pub fn counts ( & self ) -> ( usize , usize ) {
370371 ( self . insertions , self . deletions )
371372 }
372373
373374 pub fn is_empty ( & self ) -> bool {
374375 self . diff . is_empty ( )
375376 }
376-
377- pub fn into_parts (
378- self ,
379- ) -> ( LinkedHashMap < BitcoinNodeHash , bool > , usize , usize ) {
380- ( self . diff , self . insertions , self . deletions )
381- }
382377}
383378
384379#[ derive( Debug , Error ) ]
@@ -395,10 +390,14 @@ impl Accumulator {
395390 & mut self ,
396391 diff : AccumulatorDiff ,
397392 ) -> Result < ( ) , UtreexoError > {
398- let ( diff, insertions_len, deletions_len) = diff. into_parts ( ) ;
393+ let AccumulatorDiff {
394+ diff,
395+ insertions : n_insertions,
396+ deletions : n_deletions,
397+ } = diff;
399398 let ( mut insertions, mut deletions) = (
400- Vec :: with_capacity ( insertions_len ) ,
401- Vec :: with_capacity ( deletions_len ) ,
399+ Vec :: with_capacity ( n_insertions ) ,
400+ Vec :: with_capacity ( n_deletions ) ,
402401 ) ;
403402 for ( utxo_hash, insert) in diff {
404403 if insert {
0 commit comments