File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
extensions/native/circuit/src/poseidon2 Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -674,15 +674,15 @@ where
674674 let mut final_timestamp_inc = NUM_HEAD_ACCESSES ;
675675 while len > 0 {
676676 if len >= ( CHUNK - pos) {
677- chunks. push ( ( pos. clone ( ) , CHUNK . clone ( ) ) ) ;
677+ chunks. push ( ( pos, CHUNK ) ) ;
678678 len -= CHUNK - pos;
679679 final_timestamp_inc += 2 * ( CHUNK - pos) + 1 ;
680680 pos = 0 ;
681681 } else {
682- chunks. push ( ( pos. clone ( ) , pos + len) ) ;
682+ chunks. push ( ( pos, pos + len) ) ;
683683 final_timestamp_inc += 2 * len;
684684 len = 0 ;
685- pos = pos + len;
685+ pos += len;
686686 }
687687 }
688688
Original file line number Diff line number Diff line change @@ -610,7 +610,7 @@ unsafe fn execute_multi_observe_e12_impl<
610610 } else {
611611 observation_chunks. push ( ( pos, pos + len) ) ;
612612 len = 0 ;
613- pos = pos + len;
613+ pos += len;
614614 }
615615 }
616616
@@ -619,14 +619,14 @@ unsafe fn execute_multi_observe_e12_impl<
619619
620620 for ( chunk_start, chunk_end) in observation_chunks {
621621 for j in chunk_start..chunk_end {
622- let [ n_f] : [ F ; 1 ] = exec_state. vm_read ( NATIVE_AS as u32 , input_ptr_u32 + input_idx) ;
623- exec_state. vm_write ( NATIVE_AS as u32 , sponge_ptr_u32 + ( j as u32 ) , & [ n_f] ) ;
622+ let [ n_f] : [ F ; 1 ] = exec_state. vm_read ( NATIVE_AS , input_ptr_u32 + input_idx) ;
623+ exec_state. vm_write ( NATIVE_AS , sponge_ptr_u32 + ( j as u32 ) , & [ n_f] ) ;
624624 input_idx += 1 ;
625625 }
626626 if chunk_end == CHUNK {
627- let mut p2_input: [ F ; CHUNK * 2 ] = exec_state. vm_read ( NATIVE_AS as u32 , sponge_ptr_u32) ;
627+ let mut p2_input: [ F ; CHUNK * 2 ] = exec_state. vm_read ( NATIVE_AS , sponge_ptr_u32) ;
628628 subchip. permute_mut ( & mut p2_input) ;
629- exec_state. vm_write ( NATIVE_AS as u32 , sponge_ptr_u32, & p2_input) ;
629+ exec_state. vm_write ( NATIVE_AS , sponge_ptr_u32, & p2_input) ;
630630 }
631631
632632 height += 1 ;
You can’t perform that action at this time.
0 commit comments