@@ -710,7 +710,7 @@ fn fifo_compaction_test() {
710710
711711 let block_cache_hit_count = ctx. metric ( PerfMetric :: BlockCacheHitCount ) ;
712712 if block_cache_hit_count > 0 {
713- let expect = format ! ( "block_cache_hit_count = {}" , block_cache_hit_count ) ;
713+ let expect = format ! ( "block_cache_hit_count = {block_cache_hit_count}" ) ;
714714 assert ! ( ctx. report( true ) . contains( & expect) ) ;
715715 }
716716
@@ -829,7 +829,7 @@ fn get_with_cache_and_bulkload_test() {
829829 // write a lot
830830 let mut batch = WriteBatch :: default ( ) ;
831831 for i in 0 ..10_000 {
832- batch. put ( format ! ( "{:0>4}" , i ) . as_bytes ( ) , b"v" ) ;
832+ batch. put ( format ! ( "{i :0>4}" ) . as_bytes ( ) , b"v" ) ;
833833 }
834834 assert ! ( db. write( batch) . is_ok( ) ) ;
835835
@@ -858,7 +858,7 @@ fn get_with_cache_and_bulkload_test() {
858858 // try to get key
859859 let iter = db. iterator ( IteratorMode :: Start ) ;
860860 for ( expected, ( k, _) ) in iter. map ( Result :: unwrap) . enumerate ( ) {
861- assert_eq ! ( k. as_ref( ) , format!( "{:0>4}" , expected ) . as_bytes( ) ) ;
861+ assert_eq ! ( k. as_ref( ) , format!( "{expected :0>4}" ) . as_bytes( ) ) ;
862862 }
863863
864864 // check live files (sst files meta)
@@ -919,7 +919,7 @@ fn get_with_cache_and_bulkload_test() {
919919 // try to get key
920920 let iter = db. iterator ( IteratorMode :: Start ) ;
921921 for ( expected, ( k, _) ) in iter. map ( Result :: unwrap) . enumerate ( ) {
922- assert_eq ! ( k. as_ref( ) , format!( "{:0>4}" , expected ) . as_bytes( ) ) ;
922+ assert_eq ! ( k. as_ref( ) , format!( "{expected :0>4}" ) . as_bytes( ) ) ;
923923 }
924924 }
925925}
@@ -964,7 +964,7 @@ fn get_with_cache_and_bulkload_and_blobs_test() {
964964 // write a lot
965965 let mut batch = WriteBatch :: default ( ) ;
966966 for i in 0 ..10_000 {
967- batch. put ( format ! ( "{:0>4}" , i ) . as_bytes ( ) , b"v" ) ;
967+ batch. put ( format ! ( "{i :0>4}" ) . as_bytes ( ) , b"v" ) ;
968968 }
969969 assert ! ( db. write( batch) . is_ok( ) ) ;
970970
@@ -993,7 +993,7 @@ fn get_with_cache_and_bulkload_and_blobs_test() {
993993 // try to get key
994994 let iter = db. iterator ( IteratorMode :: Start ) ;
995995 for ( expected, ( k, _) ) in iter. map ( Result :: unwrap) . enumerate ( ) {
996- assert_eq ! ( k. as_ref( ) , format!( "{:0>4}" , expected ) . as_bytes( ) ) ;
996+ assert_eq ! ( k. as_ref( ) , format!( "{expected :0>4}" ) . as_bytes( ) ) ;
997997 }
998998
999999 // check live files (sst files meta)
@@ -1054,7 +1054,7 @@ fn get_with_cache_and_bulkload_and_blobs_test() {
10541054 // try to get key
10551055 let iter = db. iterator ( IteratorMode :: Start ) ;
10561056 for ( expected, ( k, _) ) in iter. map ( Result :: unwrap) . enumerate ( ) {
1057- assert_eq ! ( k. as_ref( ) , format!( "{:0>4}" , expected ) . as_bytes( ) ) ;
1057+ assert_eq ! ( k. as_ref( ) , format!( "{expected :0>4}" ) . as_bytes( ) ) ;
10581058 }
10591059 }
10601060}
0 commit comments