@@ -364,7 +364,7 @@ mod tests {
364364 for _ in 10 ..20 {
365365 TTLMap :: < String , i32 > :: gc ( ttl_map. time . clone ( ) , & ttl_map. buckets ) ;
366366 }
367- assert_eventually ( || ttl_map. data . len ( ) == 0 , Duration :: from_millis ( 100 ) ) . await ;
367+ assert_eventually ( || ttl_map. data . is_empty ( ) , Duration :: from_millis ( 100 ) ) . await ;
368368 // All entries expired
369369 }
370370
@@ -421,7 +421,7 @@ mod tests {
421421 handle. await . unwrap ( ) ;
422422 }
423423
424- assert_eventually ( || ttl_map. data . len ( ) == 0 , Duration :: from_millis ( 20 ) ) . await ;
424+ assert_eventually ( || ttl_map. data . is_empty ( ) , Duration :: from_millis ( 20 ) ) . await ;
425425 }
426426
427427 #[ tokio:: test]
@@ -442,7 +442,7 @@ mod tests {
442442 }
443443
444444 // Entry should be expired and time should have wrapped
445- assert_eventually ( || ttl_map. data . len ( ) == 0 , Duration :: from_millis ( 100 ) ) . await ;
445+ assert_eventually ( || ttl_map. data . is_empty ( ) , Duration :: from_millis ( 100 ) ) . await ;
446446 let final_time = ttl_map. time . load ( Ordering :: SeqCst ) ;
447447 assert ! ( final_time < 100 ) ;
448448 }
@@ -539,6 +539,6 @@ mod tests {
539539 for _ in 0 ..5 {
540540 TTLMap :: < String , i32 > :: gc ( ttl_map. time . clone ( ) , & ttl_map. buckets ) ;
541541 }
542- assert_eventually ( || ttl_map. data . len ( ) == 0 , Duration :: from_millis ( 100 ) ) . await ;
542+ assert_eventually ( || ttl_map. data . is_empty ( ) , Duration :: from_millis ( 100 ) ) . await ;
543543 }
544544}
0 commit comments