@@ -1345,8 +1345,9 @@ mod benchmark {
13451345 fn load_provinces_ck3 ( bencher : Bencher , ( vanilla_dir, modpath) : ( & str , & PathBuf ) ) {
13461346 bencher
13471347 . with_inputs ( || {
1348- let fileset =
1349- Fileset :: builder ( Some ( Path :: new ( vanilla_dir) ) ) . with_modfile ( modpath) . unwrap ( ) ;
1348+ let fileset = Fileset :: builder ( Some ( Path :: new ( vanilla_dir) ) )
1349+ . with_modfile ( modpath. clone ( ) )
1350+ . unwrap ( ) ;
13501351 Everything :: new ( fileset, None , None , None ) . unwrap ( )
13511352 } )
13521353 . bench_local_refs ( |everything| {
@@ -1359,8 +1360,9 @@ mod benchmark {
13591360 fn load_provinces_vic3 ( bencher : Bencher , ( vanilla_dir, modpath) : ( & str , & PathBuf ) ) {
13601361 bencher
13611362 . with_inputs ( || {
1362- let fileset =
1363- Fileset :: builder ( Some ( Path :: new ( vanilla_dir) ) ) . with_metadata ( modpath) . unwrap ( ) ;
1363+ let fileset = Fileset :: builder ( Some ( Path :: new ( vanilla_dir) ) )
1364+ . with_metadata ( modpath. clone ( ) )
1365+ . unwrap ( ) ;
13641366 Everything :: new ( fileset, None , None , None ) . unwrap ( )
13651367 } )
13661368 . bench_local_refs ( |everything| {
@@ -1375,13 +1377,13 @@ mod benchmark {
13751377 let fileset = Fileset :: builder ( Some ( Path :: new ( vanilla_dir) ) ) ;
13761378 let fileset = match Game :: game ( ) {
13771379 #[ cfg( feature = "ck3" ) ]
1378- Game :: Ck3 => fileset. with_modfile ( modpath) ,
1380+ Game :: Ck3 => fileset. with_modfile ( modpath. clone ( ) ) ,
13791381 #[ cfg( feature = "vic3" ) ]
1380- Game :: Vic3 => fileset. with_metadata ( modpath) ,
1382+ Game :: Vic3 => fileset. with_metadata ( modpath. clone ( ) ) ,
13811383 #[ cfg( feature = "imperator" ) ]
1382- Game :: Imperator => fileset. with_modfile ( modpath) ,
1384+ Game :: Imperator => fileset. with_modfile ( modpath. clone ( ) ) ,
13831385 #[ cfg( feature = "hoi4" ) ]
1384- Game :: Hoi4 => fileset. with_modfile ( modpath) ,
1386+ Game :: Hoi4 => fileset. with_modfile ( modpath. clone ( ) ) ,
13851387 }
13861388 . unwrap ( ) ;
13871389 Everything :: new ( fileset, None , None , None ) . unwrap ( )
0 commit comments