@@ -558,11 +558,9 @@ mod tests {
558
558
)
559
559
. expect ( "round 2 failed" ) ;
560
560
561
- let mut participants = Vec :: with_capacity ( 2 ) ;
562
561
let id2_ser: & [ u8 ] = & identity2. serialize ( ) ;
563
562
let id3_ser: & [ u8 ] = & identity3. serialize ( ) ;
564
- participants. push ( id2_ser) ;
565
- participants. push ( id3_ser) ;
563
+ let participants = vec ! [ id2_ser, id3_ser] ;
566
564
567
565
let pkg2_ser = package2
568
566
. frost_package ( )
@@ -573,9 +571,7 @@ mod tests {
573
571
. serialize ( )
574
572
. expect ( "serialization failed" ) ;
575
573
576
- let mut round1_frost_packages: Vec < & [ u8 ] > = Vec :: with_capacity ( 2 ) ;
577
- round1_frost_packages. push ( & pkg2_ser[ ..] ) ;
578
- round1_frost_packages. push ( & pkg3_ser[ ..] ) ;
574
+ let round1_frost_packages: Vec < & [ u8 ] > = vec ! [ & pkg2_ser[ ..] , & pkg3_ser[ ..] ] ;
579
575
580
576
let pkg2_2 = round2_public_packages_2
581
577
. package_for ( & identity1)
@@ -590,14 +586,13 @@ mod tests {
590
586
. serialize ( )
591
587
. expect ( "round2 public package serialization failed" ) ;
592
588
593
- let mut round2_frost_packages: Vec < & [ u8 ] > = Vec :: with_capacity ( 2 ) ;
594
- round2_frost_packages. push ( & pkg2_2[ ..] ) ;
595
- round2_frost_packages. push ( & pkg2_3[ ..] ) ;
589
+ let round2_frost_packages: Vec < & [ u8 ] > = vec ! [ & pkg2_2[ ..] , & pkg2_3[ ..] ] ;
596
590
597
- let mut gsk_bytes: Vec < & [ u8 ] > = Vec :: with_capacity ( 3 ) ;
598
- gsk_bytes. push ( package1. group_secret_key_shard_encrypted ( ) ) ;
599
- gsk_bytes. push ( package2. group_secret_key_shard_encrypted ( ) ) ;
600
- gsk_bytes. push ( package3. group_secret_key_shard_encrypted ( ) ) ;
591
+ let gsk_bytes: Vec < & [ u8 ] > = vec ! [
592
+ package1. group_secret_key_shard_encrypted( ) ,
593
+ package2. group_secret_key_shard_encrypted( ) ,
594
+ package3. group_secret_key_shard_encrypted( ) ,
595
+ ] ;
601
596
602
597
round3_min (
603
598
& secret1,
0 commit comments