@@ -1160,7 +1160,6 @@ pub(crate) mod tests {
11601160 } ;
11611161 use rand:: SeedableRng as _;
11621162 use rand:: rngs:: StdRng ;
1163- use std:: u32;
11641163 use std:: { fmt:: Debug , sync:: Arc , time:: Duration } ;
11651164 use test_utils:: get_seed;
11661165 use test_utils:: { arbitrary:: UnstructuredHolder , sim_clock:: SimClock } ;
@@ -1516,18 +1515,6 @@ pub(crate) mod tests {
15161515 }
15171516 let execution_log2 = db_connection. get ( & execution_id) . await . unwrap ( ) ;
15181517 println ! ( "{execution_log2:?}" ) ;
1519-
1520- fn skip_locked < ' a > (
1521- events_iter : impl Iterator < Item = & ' a ExecutionEvent > ,
1522- ) -> impl Iterator < Item = & ' a ExecutionEventInner > {
1523- events_iter. filter_map ( |event| {
1524- if matches ! ( event. event, ExecutionEventInner :: Locked { .. } ) {
1525- None
1526- } else {
1527- Some ( & event. event )
1528- }
1529- } )
1530- }
15311518 assert_eq ! (
15321519 skip_locked( execution_log. events. iter( ) ) . count( ) ,
15331520 skip_locked( execution_log2. events. iter( ) ) . count( )
@@ -2042,4 +2029,16 @@ pub(crate) mod tests {
20422029 let child_res = child_log. into_finished_result ( ) . unwrap ( ) ;
20432030 assert_matches ! ( child_res, Ok ( SupportedFunctionReturnValue :: None ) ) ;
20442031 }
2032+
2033+ fn skip_locked < ' a > (
2034+ events_iter : impl Iterator < Item = & ' a ExecutionEvent > ,
2035+ ) -> impl Iterator < Item = & ' a ExecutionEventInner > {
2036+ events_iter. filter_map ( |event| {
2037+ if matches ! ( event. event, ExecutionEventInner :: Locked { .. } ) {
2038+ None
2039+ } else {
2040+ Some ( & event. event )
2041+ }
2042+ } )
2043+ }
20452044}
0 commit comments