@@ -1529,10 +1529,10 @@ mod tests {
15291529 z0_secondary. clone ( ) ,
15301530 ) ;
15311531
1532- for mut circuit_primary in roots. iter_mut ( ) . take ( num_steps) {
1532+ for circuit_primary in roots. iter_mut ( ) . take ( num_steps) {
15331533 let res = recursive_snark. prove_step (
15341534 & pp,
1535- & mut circuit_primary,
1535+ circuit_primary,
15361536 & mut circuit_secondary. clone ( ) ,
15371537 z0_primary. clone ( ) ,
15381538 z0_secondary. clone ( ) ,
@@ -1636,12 +1636,11 @@ mod tests {
16361636 test_ivc_base_with :: < secp256k1:: Point , secq256k1:: Point > ( ) ;
16371637 }
16381638
1639- fn print_constraints_name_on_error_index < G1 , G2 , C1 , C2 > ( err : & NovaError , mut c_primary : C1 )
1639+ fn print_constraints_name_on_error_index < G1 , G2 , C1 > ( err : & NovaError , mut c_primary : C1 )
16401640 where
16411641 G1 : Group < Base = <G2 as Group >:: Scalar > ,
16421642 G2 : Group < Base = <G1 as Group >:: Scalar > ,
16431643 C1 : StepCircuit < G1 :: Scalar > ,
1644- C2 : StepCircuit < G2 :: Scalar > ,
16451644 {
16461645 match err {
16471646 NovaError :: UnSatIndex ( index) => {
@@ -1654,7 +1653,7 @@ mod tests {
16541653 & augmented_circuit_params_primary,
16551654 None ,
16561655 & mut c_primary,
1657- ro_consts_circuit_primary. clone ( ) ,
1656+ ro_consts_circuit_primary,
16581657 ) ;
16591658 // let mut cs: ShapeCS<G1> = ShapeCS::new();
16601659 // let _ = circuit_primary.synthesize(&mut cs);
@@ -1683,7 +1682,7 @@ mod tests {
16831682
16841683 impl < G : Group > HeapifyCircuit < G >
16851684 where
1686- <G as traits :: Group >:: Base : std :: cmp :: Ord ,
1685+ <G as Group >:: Base : Ord ,
16871686 {
16881687 fn new ( heap_size : usize , ro_consts : ROConstantsCircuit < G > ) -> ( Self , Vec < G :: Base > ) {
16891688 let n = heap_size; // assume complement binary tree
@@ -1706,11 +1705,8 @@ mod tests {
17061705 ) ;
17071706
17081707 // TODO challenge should include final table (final table values + counters) commitment
1709- let gamma = Self :: pre_compute_global_challenge (
1710- initial_intermediate_gamma,
1711- ( ( n - 4 ) / 2 ) as usize ,
1712- & lookup,
1713- ) ;
1708+ let gamma =
1709+ Self :: pre_compute_global_challenge ( initial_intermediate_gamma, ( n - 4 ) / 2 , & lookup) ;
17141710
17151711 (
17161712 HeapifyCircuit { lookup, ro_consts } ,
@@ -1739,7 +1735,7 @@ mod tests {
17391735 let num_steps = initial_index;
17401736 let mut intermediate_gamma = initial_intermediate_gamma;
17411737 // simulate folding step lookup io
1742- for i in ( 0 ..num_steps + 1 ) . into_iter ( ) {
1738+ for i in 0 ..num_steps + 1 {
17431739 let mut lookup_transaction =
17441740 LookupTransactionSimulate :: < G > :: start_transaction ( & mut lookup) ;
17451741 let addr = G :: Base :: from ( ( num_steps - i) as u64 ) ;
@@ -1759,9 +1755,9 @@ mod tests {
17591755 }
17601756 }
17611757
1762- impl < F : PrimeField , G : Group + traits :: Group < Base = F > > StepCircuit < F > for HeapifyCircuit < G >
1758+ impl < F : PrimeField , G : Group + Group < Base = F > > StepCircuit < F > for HeapifyCircuit < G >
17631759 where
1764- G :: Base : std :: cmp :: Ord ,
1760+ G :: Base : Ord ,
17651761 {
17661762 fn arity ( & self ) -> usize {
17671763 6
@@ -1804,7 +1800,7 @@ mod tests {
18041800 |lc| lc + CS :: one ( ) ,
18051801 |lc| lc + right_child_index. get_variable ( ) ,
18061802 ) ;
1807- let parent = lookup_transaction. read ( cs. namespace ( || "parent" ) , & index) ?;
1803+ let parent = lookup_transaction. read ( cs. namespace ( || "parent" ) , index) ?;
18081804 let left_child =
18091805 lookup_transaction. read ( cs. namespace ( || "left_child" ) , & left_child_index) ?;
18101806 let right_child =
@@ -1838,15 +1834,15 @@ mod tests {
18381834 & is_right_child_smaller,
18391835 ) ?;
18401836
1841- lookup_transaction. write ( & index, & smallest) ?;
1837+ lookup_transaction. write ( index, & smallest) ?;
18421838
18431839 // commit the rw change
18441840 let ( next_R, next_W, next_rw_counter, next_intermediate_gamma) = lookup_transaction
18451841 . commit (
18461842 cs. namespace ( || "commit" ) ,
18471843 self . ro_consts . clone ( ) ,
18481844 prev_intermediate_gamma,
1849- & gamma,
1845+ gamma,
18501846 prev_W,
18511847 prev_R,
18521848 prev_rw_counter,
@@ -1914,7 +1910,7 @@ mod tests {
19141910 z0_secondary. clone ( ) ,
19151911 ) ;
19161912
1917- for i in ( 0 ..num_steps) . into_iter ( ) {
1913+ for i in 0 ..num_steps {
19181914 println ! ( "step i {}" , i) ;
19191915 let res = recursive_snark. prove_step (
19201916 & pp,
@@ -1934,12 +1930,10 @@ mod tests {
19341930 res
19351931 . clone ( )
19361932 . map_err ( |err| {
1937- print_constraints_name_on_error_index :: <
1938- G1 ,
1939- G2 ,
1940- HeapifyCircuit < G2 > ,
1941- TrivialTestCircuit < <G2 as Group >:: Scalar > ,
1942- > ( & err, circuit_primary. clone ( ) )
1933+ print_constraints_name_on_error_index :: < G1 , G2 , HeapifyCircuit < G2 > > (
1934+ & err,
1935+ circuit_primary. clone ( ) ,
1936+ )
19431937 } )
19441938 . unwrap ( ) ;
19451939 assert ! ( res. is_ok( ) ) ;
0 commit comments