@@ -217,17 +217,17 @@ impl LicenseInfos {
217
217
218
218
pub fn get_license_infos_from_config (
219
219
config : & CondaDenyConfig ,
220
- cli_lockfiles : & Vec < String > ,
221
- cli_platforms : & Vec < String > ,
222
- cli_environments : & Vec < String > ,
220
+ cli_lockfiles : & [ String ] ,
221
+ cli_platforms : & [ String ] ,
222
+ cli_environments : & [ String ] ,
223
223
) -> Result < LicenseInfos > {
224
224
let mut platforms = config. get_platform_spec ( ) . map_or ( vec ! [ ] , |p| p) ;
225
225
let mut lockfiles = config. get_lockfile_spec ( ) ;
226
226
let mut environment_specs = config. get_environment_spec ( ) . map_or ( vec ! [ ] , |e| e) ;
227
227
228
- platforms. extend ( cli_platforms. clone ( ) ) ;
229
- lockfiles. extend ( cli_lockfiles. clone ( ) ) ;
230
- environment_specs. extend ( cli_environments. clone ( ) ) ;
228
+ platforms. extend ( cli_platforms. to_owned ( ) ) ;
229
+ lockfiles. extend ( cli_lockfiles. to_owned ( ) ) ;
230
+ environment_specs. extend ( cli_environments. to_owned ( ) ) ;
231
231
232
232
LicenseInfos :: from_pixi_lockfiles ( lockfiles, platforms, environment_specs)
233
233
}
@@ -469,8 +469,7 @@ mod tests {
469
469
"tests/test_pyproject_toml_files/"
470
470
) ;
471
471
let config = CondaDenyConfig :: from_path ( & test_file_path) . expect ( "Failed to read config" ) ;
472
- let license_infos =
473
- LicenseInfos :: get_license_infos_from_config ( & config, & vec ! [ ] , & vec ! [ ] , & vec ! [ ] ) ;
472
+ let license_infos = LicenseInfos :: get_license_infos_from_config ( & config, & [ ] , & [ ] , & [ ] ) ;
474
473
assert_eq ! ( license_infos. unwrap( ) . license_infos. len( ) , 396 ) ;
475
474
}
476
475
}
0 commit comments