@@ -341,39 +341,27 @@ mod tests {
341341 let artifact_two_id_number = db. connection ( ) . await . artifact_id ( & artifact_two) . await ;
342342
343343 // We cannot arbitrarily add random sizes to the artifact size
344- // table, as their is a constraint that the artifact must actually
344+ // table, as there is a constraint that the artifact must actually
345345 // exist before attaching something to it.
346346
347+ let db = db. connection ( ) . await ;
348+
347349 // Artifact one inserts
348- db. connection ( )
349- . await
350- . record_artifact_size ( artifact_one_id_number, "llvm.so" , 32 )
350+ db. record_artifact_size ( artifact_one_id_number, "llvm.so" , 32 )
351351 . await ;
352- db. connection ( )
353- . await
354- . record_artifact_size ( artifact_one_id_number, "llvm.a" , 64 )
352+ db. record_artifact_size ( artifact_one_id_number, "llvm.a" , 64 )
355353 . await ;
356354
357355 // Artifact two inserts
358- db. connection ( )
359- . await
360- . record_artifact_size ( artifact_two_id_number, "another-llvm.a" , 128 )
356+ db. record_artifact_size ( artifact_two_id_number, "another-llvm.a" , 128 )
361357 . await ;
362358
363- let result_one = db
364- . connection ( )
365- . await
366- . get_artifact_size ( artifact_one_id_number)
367- . await ;
368- let result_two = db
369- . connection ( )
370- . await
371- . get_artifact_size ( artifact_two_id_number)
372- . await ;
359+ let result_one = db. get_artifact_size ( artifact_one_id_number) . await ;
360+ let result_two = db. get_artifact_size ( artifact_two_id_number) . await ;
373361
374362 // artifact one
375- assert_eq ! ( Some ( 32 as u64 ) , result_one. get( "llvm.so" ) . copied( ) ) ;
376- assert_eq ! ( Some ( 64 as u64 ) , result_one. get( "llvm.a" ) . copied( ) ) ;
363+ assert_eq ! ( Some ( 32u64 ) , result_one. get( "llvm.so" ) . copied( ) ) ;
364+ assert_eq ! ( Some ( 64u64 ) , result_one. get( "llvm.a" ) . copied( ) ) ;
377365 assert_eq ! ( None , result_one. get( "another-llvm.a" ) . copied( ) ) ;
378366
379367 // artifact two
0 commit comments