@@ -6,7 +6,7 @@ use crate::resolve::{get_contents, Include};
66use crate :: resource_command:: { get_resource, self } ;
77use crate :: tablewriter:: Table ;
88use crate :: util:: { get_input, get_schema, in_desired_state, set_dscconfigroot, validate_json, write_object, DSC_CONFIG_ROOT , EXIT_DSC_ASSERTION_FAILED , EXIT_DSC_ERROR , EXIT_INVALID_ARGS , EXIT_INVALID_INPUT , EXIT_JSON_ERROR } ;
9- use dsc_lib:: functions:: AcceptedArgKind ;
9+ use dsc_lib:: functions:: FunctionArgKind ;
1010use dsc_lib:: {
1111 configure:: {
1212 config_doc:: {
@@ -697,12 +697,12 @@ fn list_functions(functions: &FunctionDispatcher, function_name: Option<&String>
697697 write_table = true ;
698698 }
699699 let mut include_separator = false ;
700- let accepted_arg_types = [
701- ( AcceptedArgKind :: Array , "a" ) ,
702- ( AcceptedArgKind :: Boolean , "b" ) ,
703- ( AcceptedArgKind :: Number , "n" ) ,
704- ( AcceptedArgKind :: String , "s" ) ,
705- ( AcceptedArgKind :: Object , "o" ) ,
700+ let returned_types = [
701+ ( FunctionArgKind :: Array , "a" ) ,
702+ ( FunctionArgKind :: Boolean , "b" ) ,
703+ ( FunctionArgKind :: Number , "n" ) ,
704+ ( FunctionArgKind :: String , "s" ) ,
705+ ( FunctionArgKind :: Object , "o" ) ,
706706 ] ;
707707
708708 let asterisks = String :: from ( "*" ) ;
@@ -724,9 +724,9 @@ fn list_functions(functions: &FunctionDispatcher, function_name: Option<&String>
724724
725725 if write_table {
726726 // construct arg_types from '-' times number of accepted_arg_types
727- let mut arg_types = "-" . repeat ( accepted_arg_types . len ( ) ) ;
728- for ( i, ( arg_type, letter) ) in accepted_arg_types . iter ( ) . enumerate ( ) {
729- if function. accepted_arg_types . contains ( arg_type) {
727+ let mut arg_types = "-" . repeat ( returned_types . len ( ) ) ;
728+ for ( i, ( arg_type, letter) ) in returned_types . iter ( ) . enumerate ( ) {
729+ if function. return_types . contains ( arg_type) {
730730 arg_types. replace_range ( i..=i, letter) ;
731731 }
732732 }
0 commit comments