@@ -322,10 +322,8 @@ pub fn config(subcommand: &ConfigSubCommand, parameters: &Option<String>, mounte
322322
323323 configurator. context . dsc_version = Some ( env ! ( "CARGO_PKG_VERSION" ) . to_string ( ) ) ;
324324
325- if let ConfigSubCommand :: Set { what_if , .. } = subcommand {
326- if * what_if {
327- configurator. context . execution_type = ExecutionKind :: WhatIf ;
328- }
325+ if let ConfigSubCommand :: Set { what_if , .. } = subcommand && * what_if {
326+ configurator. context . execution_type = ExecutionKind :: WhatIf ;
329327 }
330328
331329 let parameters: Option < serde_json:: Value > = match if new_parameters. is_some ( ) {
@@ -499,7 +497,7 @@ pub fn validate_config(config: &Configuration, progress_format: ProgressFormat)
499497 let type_name = & FullyQualifiedTypeName :: parse ( type_name) ?;
500498 let require_version = resource_block[ "requireVersion" ]
501499 . as_str ( )
502- . map ( |r| ResourceVersionReq :: parse ( r ) )
500+ . map ( ResourceVersionReq :: parse)
503501 . transpose ( ) ?;
504502 resource_types. push ( DiscoveryFilter :: new ( type_name, require_version, None ) ) ;
505503 }
@@ -512,7 +510,7 @@ pub fn validate_config(config: &Configuration, progress_format: ProgressFormat)
512510 let type_name = & FullyQualifiedTypeName :: parse ( type_name) ?;
513511 let require_version = resource_block[ "requireVersion" ]
514512 . as_str ( )
515- . map ( |r| ResourceVersionReq :: parse ( r ) )
513+ . map ( ResourceVersionReq :: parse)
516514 . transpose ( ) ?;
517515
518516 trace ! ( "{} '{}'" , t!( "subcommand.validatingResource" ) , resource_block[ "name" ] . as_str( ) . unwrap_or_default( ) ) ;
0 commit comments