@@ -328,7 +328,7 @@ mod tests {
328328
329329 #[ fixture]
330330 fn input_flows_sed ( commodity_sed : Commodity ) -> ProcessFlowsMap {
331- ProcessFlowsMap :: from_iter ( vec ! [ (
331+ ProcessFlowsMap :: from_iter ( [ (
332332 ( "GBR" . into ( ) , 2010 ) ,
333333 indexmap ! { commodity_sed. id. clone( ) => ProcessFlow {
334334 commodity: commodity_sed. into( ) ,
@@ -341,7 +341,7 @@ mod tests {
341341
342342 #[ fixture]
343343 fn output_flows_sed ( commodity_sed : Commodity ) -> ProcessFlowsMap {
344- ProcessFlowsMap :: from_iter ( vec ! [ (
344+ ProcessFlowsMap :: from_iter ( [ (
345345 ( "GBR" . into ( ) , 2010 ) ,
346346 indexmap ! { commodity_sed. id. clone( ) =>ProcessFlow {
347347 commodity: commodity_sed. into( ) ,
@@ -359,7 +359,7 @@ mod tests {
359359 output_flows_sed : ProcessFlowsMap ,
360360 ) {
361361 // Valid scenario
362- let flows = HashMap :: from_iter ( vec ! [
362+ let flows = HashMap :: from_iter ( [
363363 ( "process1" . into ( ) , input_flows_sed. clone ( ) ) ,
364364 ( "process2" . into ( ) , output_flows_sed. clone ( ) ) ,
365365 ] ) ;
@@ -372,7 +372,7 @@ mod tests {
372372 input_flows_sed : ProcessFlowsMap ,
373373 ) {
374374 // Invalid scenario: no producer
375- let flows = HashMap :: from_iter ( vec ! [ ( "process1" . into( ) , input_flows_sed. clone( ) ) ] ) ;
375+ let flows = HashMap :: from_iter ( [ ( "process1" . into ( ) , input_flows_sed. clone ( ) ) ] ) ;
376376 assert_error ! (
377377 validate_sed_commodity( & commodity_sed. id, & flows, & "GBR" . into( ) , 2010 ) ,
378378 "Commodity commodity_sed of 'SED' type must have both producer and consumer processes for region GBR in year 2010"
@@ -382,7 +382,7 @@ mod tests {
382382 #[ rstest]
383383 fn test_validate_sed_commodity ( commodity_sed : Commodity , output_flows_sed : ProcessFlowsMap ) {
384384 // Invalid scenario: no consumer
385- let flows = HashMap :: from_iter ( vec ! [ ( "process2" . into( ) , output_flows_sed. clone( ) ) ] ) ;
385+ let flows = HashMap :: from_iter ( [ ( "process2" . into ( ) , output_flows_sed. clone ( ) ) ] ) ;
386386 assert_error ! (
387387 validate_sed_commodity( & commodity_sed. id, & flows, & "GBR" . into( ) , 2010 ) ,
388388 "Commodity commodity_sed of 'SED' type must have both producer and consumer processes for region GBR in year 2010"
@@ -391,7 +391,7 @@ mod tests {
391391
392392 #[ fixture]
393393 fn commodity_svd ( time_slice : TimeSliceID ) -> Commodity {
394- let demand = DemandMap :: from_iter ( vec ! [ ( ( "GBR" . into( ) , 2010 , time_slice. into( ) ) , 10.0 ) ] ) ;
394+ let demand = DemandMap :: from_iter ( [ ( ( "GBR" . into ( ) , 2010 , time_slice. into ( ) ) , 10.0 ) ] ) ;
395395
396396 Commodity {
397397 id : "commodity_svd" . into ( ) ,
@@ -405,9 +405,9 @@ mod tests {
405405
406406 #[ fixture]
407407 fn flows_svd ( commodity_svd : Commodity ) -> HashMap < ProcessID , ProcessFlowsMap > {
408- HashMap :: from_iter ( vec ! [ (
408+ HashMap :: from_iter ( [ (
409409 "process1" . into ( ) ,
410- ProcessFlowsMap :: from_iter( vec! [ (
410+ ProcessFlowsMap :: from_iter ( [ (
411411 ( "GBR" . into ( ) , 2010 ) ,
412412 indexmap ! { commodity_svd. id. clone( ) => ProcessFlow {
413413 commodity: commodity_svd. into( ) ,
@@ -426,9 +426,9 @@ mod tests {
426426 time_slice_info : TimeSliceInfo ,
427427 time_slice : TimeSliceID ,
428428 ) {
429- let availabilities = HashMap :: from_iter ( vec ! [ (
429+ let availabilities = HashMap :: from_iter ( [ (
430430 "process1" . into ( ) ,
431- ProcessActivityLimitsMap :: from_iter( vec! [ (
431+ ProcessActivityLimitsMap :: from_iter ( [ (
432432 ( "GBR" . into ( ) , 2010 , time_slice. clone ( ) ) ,
433433 0.1 ..=0.9 ,
434434 ) ] ) ,
@@ -455,9 +455,9 @@ mod tests {
455455 time_slice : TimeSliceID ,
456456 ) {
457457 // Invalid scenario: no availability
458- let availabilities = HashMap :: from_iter ( vec ! [ (
458+ let availabilities = HashMap :: from_iter ( [ (
459459 "process1" . into ( ) ,
460- ProcessActivityLimitsMap :: from_iter( vec! [ (
460+ ProcessActivityLimitsMap :: from_iter ( [ (
461461 ( "GBR" . into ( ) , 2010 , time_slice. clone ( ) ) ,
462462 0.0 ..=0.0 ,
463463 ) ] ) ,
@@ -491,7 +491,7 @@ mod tests {
491491
492492 #[ fixture]
493493 fn producer_flows ( commodity_other : Commodity ) -> ProcessFlowsMap {
494- ProcessFlowsMap :: from_iter ( vec ! [ (
494+ ProcessFlowsMap :: from_iter ( [ (
495495 ( "GBR" . into ( ) , 2010 ) ,
496496 indexmap ! { commodity_other. id. clone( ) => ProcessFlow {
497497 commodity: commodity_other. into( ) ,
@@ -504,7 +504,7 @@ mod tests {
504504
505505 #[ fixture]
506506 fn consumer_flows ( commodity_other : Commodity ) -> ProcessFlowsMap {
507- ProcessFlowsMap :: from_iter ( vec ! [ (
507+ ProcessFlowsMap :: from_iter ( [ (
508508 ( "GBR" . into ( ) , 2010 ) ,
509509 indexmap ! { commodity_other. id. clone( ) => ProcessFlow {
510510 commodity: commodity_other. into( ) ,
@@ -521,7 +521,7 @@ mod tests {
521521 producer_flows : ProcessFlowsMap ,
522522 ) {
523523 // Valid scenario: commodity is only produced
524- let flows = HashMap :: from_iter ( vec ! [ ( "process1" . into( ) , producer_flows) ] ) ;
524+ let flows = HashMap :: from_iter ( [ ( "process1" . into ( ) , producer_flows) ] ) ;
525525 assert ! ( validate_other_commodity( & commodity_other. id, & flows) . is_ok( ) ) ;
526526 }
527527
@@ -531,7 +531,7 @@ mod tests {
531531 consumer_flows : ProcessFlowsMap ,
532532 ) {
533533 // Valid scenario: commodity is only consumed
534- let flows = HashMap :: from_iter ( vec ! [ ( "process1" . into( ) , consumer_flows) ] ) ;
534+ let flows = HashMap :: from_iter ( [ ( "process1" . into ( ) , consumer_flows) ] ) ;
535535 assert ! ( validate_other_commodity( & commodity_other. id, & flows) . is_ok( ) ) ;
536536 }
537537
@@ -542,7 +542,7 @@ mod tests {
542542 consumer_flows : ProcessFlowsMap ,
543543 ) {
544544 // Invalid scenario: commodity is both produced and consumed
545- let flows = HashMap :: from_iter ( vec ! [
545+ let flows = HashMap :: from_iter ( [
546546 ( "process1" . into ( ) , producer_flows) ,
547547 ( "process2" . into ( ) , consumer_flows) ,
548548 ] ) ;
0 commit comments