@@ -1454,10 +1454,10 @@ impl DatabaseQueue for TestQueue {
14541454 crate :: priority:: JobPriority :: High ,
14551455 crate :: priority:: JobPriority :: Critical ,
14561456 ] {
1457- job_counts. insert ( priority. clone ( ) , 0 ) ;
1458- avg_processing_times. insert ( priority. clone ( ) , 0.0 ) ;
1459- recent_throughput. insert ( priority. clone ( ) , 0 ) ;
1460- priority_distribution. insert ( priority. clone ( ) , 0.0 ) ;
1457+ job_counts. insert ( priority, 0 ) ;
1458+ avg_processing_times. insert ( priority, 0.0 ) ;
1459+ recent_throughput. insert ( priority, 0 ) ;
1460+ priority_distribution. insert ( priority, 0.0 ) ;
14611461 }
14621462
14631463 let mut total_jobs = 0u64 ;
@@ -1466,7 +1466,7 @@ impl DatabaseQueue for TestQueue {
14661466 for jobs in queue_jobs. values ( ) {
14671467 for job_id in jobs {
14681468 if let Some ( job) = storage. jobs . get ( job_id) {
1469- * job_counts. entry ( job. priority . clone ( ) ) . or_insert ( 0 ) += 1 ;
1469+ * job_counts. entry ( job. priority ) . or_insert ( 0 ) += 1 ;
14701470 total_jobs += 1 ;
14711471
14721472 // Calculate processing time if job is completed
@@ -1475,7 +1475,7 @@ impl DatabaseQueue for TestQueue {
14751475 let current_avg = avg_processing_times. get ( & job. priority ) . unwrap_or ( & 0.0 ) ;
14761476 let current_count = * job_counts. get ( & job. priority ) . unwrap_or ( & 1 ) ;
14771477 let new_avg = ( current_avg * ( current_count - 1 ) as f64 + processing_time) / current_count as f64 ;
1478- avg_processing_times. insert ( job. priority . clone ( ) , new_avg) ;
1478+ avg_processing_times. insert ( job. priority , new_avg) ;
14791479 }
14801480 }
14811481 }
@@ -1489,7 +1489,7 @@ impl DatabaseQueue for TestQueue {
14891489 } else {
14901490 0.0
14911491 } ;
1492- priority_distribution. insert ( priority. clone ( ) , percentage) ;
1492+ priority_distribution. insert ( * priority, percentage) ;
14931493 }
14941494
14951495 Ok ( crate :: priority:: PriorityStats {
0 commit comments