@@ -272,7 +272,6 @@ mod tests {
272272 } ,
273273 preconfirmation:: {
274274 Preconfirmation ,
275- PreconfirmationStatus ,
276275 Preconfirmations ,
277276 } ,
278277 txpool:: TransactionStatus ,
@@ -545,14 +544,13 @@ mod tests {
545544 let ( sender, receiver) = oneshot:: channel ( ) ;
546545 status_read
547546 . send ( ReadRequest :: GetStatus {
548- tx_id : ( * id) . into ( ) ,
547+ tx_id : ( * id) ,
549548 sender,
550549 } )
551550 . await
552551 . unwrap ( ) ;
553552
554- let response = receiver. await . unwrap ( ) ;
555- response
553+ receiver. await . unwrap ( )
556554 }
557555
558556 async fn assert_status < F > (
@@ -566,7 +564,7 @@ mod tests {
566564 let ( sender, receiver) = oneshot:: channel ( ) ;
567565 status_read
568566 . send ( ReadRequest :: GetStatus {
569- tx_id : ( * id) . into ( ) ,
567+ tx_id : ( * id) ,
570568 sender,
571569 } )
572570 . await
@@ -586,8 +584,6 @@ mod tests {
586584 }
587585
588586 async fn assert_status_change_notifications (
589- tx_id : Bytes32 ,
590- tx_status_change : & TxStatusChange ,
591587 validators : & [ for <' a > fn ( & ' a TransactionStatus ) -> bool ] ,
592588 mut stream : BoxStream < ' _ , TxStatusMessage > ,
593589 ) {
@@ -605,9 +601,7 @@ mod tests {
605601 }
606602
607603 assert_eq ! ( received_statuses. len( ) , validators. len( ) , "Length mismatch" ) ;
608- for ( i, ( item, & validator) ) in
609- received_statuses. iter ( ) . zip ( validators. iter ( ) ) . enumerate ( )
610- {
604+ for ( item, & validator) in received_statuses. iter ( ) . zip ( validators. iter ( ) ) {
611605 assert ! ( validator( item) ) ;
612606 }
613607 }
@@ -679,22 +673,16 @@ mod tests {
679673 . await ;
680674
681675 assert_status_change_notifications (
682- tx1_id,
683- & handles. tx_status_change ,
684676 & [ |s| matches ! ( s, & TransactionStatus :: PreConfirmationSuccess ( _) ) ] ,
685677 stream_tx1,
686678 )
687679 . await ;
688680 assert_status_change_notifications (
689- tx2_id,
690- & handles. tx_status_change ,
691681 & [ |s| matches ! ( s, & TransactionStatus :: PreConfirmationSqueezedOut ( _) ) ] ,
692682 stream_tx2,
693683 )
694684 . await ;
695685 assert_status_change_notifications (
696- tx3_id,
697- & handles. tx_status_change ,
698686 & [ |s| matches ! ( s, & TransactionStatus :: PreConfirmationFailure ( _) ) ] ,
699687 stream_tx3,
700688 )
@@ -901,7 +889,7 @@ mod tests {
901889
902890 // Given
903891 let tx1_id = [ 1u8 ; 32 ] . into ( ) ;
904- let status_updates = vec ! [
892+ let status_updates = [
905893 ( tx1_id, status:: transaction:: submitted ( ) ) ,
906894 ( tx1_id, status:: transaction:: success ( ) ) ,
907895 ] ;
@@ -924,8 +912,6 @@ mod tests {
924912
925913 // Then
926914 assert_status_change_notifications (
927- tx1_id,
928- & handles. tx_status_change ,
929915 & [
930916 |s| matches ! ( s, & TransactionStatus :: Submitted ( _) ) ,
931917 |s| matches ! ( s, & TransactionStatus :: Success ( _) ) ,
@@ -992,7 +978,7 @@ mod tests {
992978
993979 #[ tokio:: main( start_paused = true , flavor = "current_thread" ) ]
994980 #[ allow( clippy:: arithmetic_side_effects) ]
995- async fn _pruning__correctly_prunes_old_statuses (
981+ async fn _run__correctly_prunes_old_statuses (
996982 ttl : Duration ,
997983 actions : Vec < Action > ,
998984 ) {
@@ -1077,11 +1063,11 @@ mod tests {
10771063
10781064 #[ test]
10791065 #[ allow( clippy:: arithmetic_side_effects) ]
1080- fn pruning__correctly_prunes_old_statuses (
1066+ fn run__correctly_prunes_old_statuses (
10811067 ttl in ttl_strategy( MIN_TTL , MAX_TTL ) ,
10821068 actions in actions_strategy( MIN_ACTIONS , MAX_ACTIONS )
10831069 ) {
1084- _pruning__correctly_prunes_old_statuses ( ttl, actions) ;
1070+ _run__correctly_prunes_old_statuses ( ttl, actions) ;
10851071 }
10861072 }
10871073}
0 commit comments