@@ -494,7 +494,7 @@ pub fn validate_config(config: &Configuration, progress_format: ProgressFormat)
494
494
let Some ( type_name) = resource_block[ "type" ] . as_str ( ) else {
495
495
return Err ( DscError :: Validation ( t ! ( "subcommand.resourceTypeNotSpecified" ) . to_string ( ) ) ) ;
496
496
} ;
497
- resource_types. push ( DiscoveryFilter :: new ( type_name. to_lowercase ( ) . to_string ( ) , resource_block[ "api_version" ] . as_str ( ) . map ( |s| s . to_string ( ) ) ) ) ;
497
+ resource_types. push ( DiscoveryFilter :: new ( & type_name. to_lowercase ( ) , resource_block[ "api_version" ] . as_str ( ) . map ( std :: string :: ToString :: to_string) ) ) ;
498
498
}
499
499
dsc. find_resources ( & resource_types, progress_format) ;
500
500
@@ -574,16 +574,16 @@ pub fn resource(subcommand: &ResourceSubCommand, progress_format: ProgressFormat
574
574
list_resources ( & mut dsc, resource_name. as_ref ( ) , adapter_name. as_ref ( ) , description. as_ref ( ) , tags. as_ref ( ) , output_format. as_ref ( ) , progress_format) ;
575
575
} ,
576
576
ResourceSubCommand :: Schema { resource , version, output_format } => {
577
- dsc. find_resources ( & [ DiscoveryFilter :: new ( resource. clone ( ) , version. clone ( ) ) ] , progress_format) ;
577
+ dsc. find_resources ( & [ DiscoveryFilter :: new ( resource, version. clone ( ) ) ] , progress_format) ;
578
578
resource_command:: schema ( & mut dsc, resource, version. as_deref ( ) , output_format. as_ref ( ) ) ;
579
579
} ,
580
580
ResourceSubCommand :: Export { resource, version, input, file, output_format } => {
581
- dsc. find_resources ( & [ DiscoveryFilter :: new ( resource. clone ( ) , version. clone ( ) ) ] , progress_format) ;
581
+ dsc. find_resources ( & [ DiscoveryFilter :: new ( resource, version. clone ( ) ) ] , progress_format) ;
582
582
let parsed_input = get_input ( input. as_ref ( ) , file. as_ref ( ) , false ) ;
583
583
resource_command:: export ( & mut dsc, resource, version. as_deref ( ) , & parsed_input, output_format. as_ref ( ) ) ;
584
584
} ,
585
585
ResourceSubCommand :: Get { resource, version, input, file : path, all, output_format } => {
586
- dsc. find_resources ( & [ DiscoveryFilter :: new ( resource. clone ( ) , version. clone ( ) ) ] , progress_format) ;
586
+ dsc. find_resources ( & [ DiscoveryFilter :: new ( resource, version. clone ( ) ) ] , progress_format) ;
587
587
if * all {
588
588
resource_command:: get_all ( & mut dsc, resource, version. as_deref ( ) , output_format. as_ref ( ) ) ;
589
589
}
@@ -597,17 +597,17 @@ pub fn resource(subcommand: &ResourceSubCommand, progress_format: ProgressFormat
597
597
}
598
598
} ,
599
599
ResourceSubCommand :: Set { resource, version, input, file : path, output_format } => {
600
- dsc. find_resources ( & [ DiscoveryFilter :: new ( resource. clone ( ) , version. clone ( ) ) ] , progress_format) ;
600
+ dsc. find_resources ( & [ DiscoveryFilter :: new ( resource, version. clone ( ) ) ] , progress_format) ;
601
601
let parsed_input = get_input ( input. as_ref ( ) , path. as_ref ( ) , false ) ;
602
602
resource_command:: set ( & mut dsc, resource, version. as_deref ( ) , & parsed_input, output_format. as_ref ( ) ) ;
603
603
} ,
604
604
ResourceSubCommand :: Test { resource, version, input, file : path, output_format } => {
605
- dsc. find_resources ( & [ DiscoveryFilter :: new ( resource. clone ( ) , version. clone ( ) ) ] , progress_format) ;
605
+ dsc. find_resources ( & [ DiscoveryFilter :: new ( resource, version. clone ( ) ) ] , progress_format) ;
606
606
let parsed_input = get_input ( input. as_ref ( ) , path. as_ref ( ) , false ) ;
607
607
resource_command:: test ( & mut dsc, resource, version. as_deref ( ) , & parsed_input, output_format. as_ref ( ) ) ;
608
608
} ,
609
609
ResourceSubCommand :: Delete { resource, version, input, file : path } => {
610
- dsc. find_resources ( & [ DiscoveryFilter :: new ( resource. clone ( ) , version. clone ( ) ) ] , progress_format) ;
610
+ dsc. find_resources ( & [ DiscoveryFilter :: new ( resource, version. clone ( ) ) ] , progress_format) ;
611
611
let parsed_input = get_input ( input. as_ref ( ) , path. as_ref ( ) , false ) ;
612
612
resource_command:: delete ( & mut dsc, resource, version. as_deref ( ) , & parsed_input) ;
613
613
} ,
0 commit comments