@@ -6,7 +6,7 @@ use crate::resolve::{get_contents, Include};
6
6
use crate :: resource_command:: { get_resource, self } ;
7
7
use crate :: tablewriter:: Table ;
8
8
use 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 ;
10
10
use dsc_lib:: {
11
11
configure:: {
12
12
config_doc:: {
@@ -697,12 +697,12 @@ fn list_functions(functions: &FunctionDispatcher, function_name: Option<&String>
697
697
write_table = true ;
698
698
}
699
699
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" ) ,
706
706
] ;
707
707
708
708
let asterisks = String :: from ( "*" ) ;
@@ -724,9 +724,9 @@ fn list_functions(functions: &FunctionDispatcher, function_name: Option<&String>
724
724
725
725
if write_table {
726
726
// 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) {
730
730
arg_types. replace_range ( i..=i, letter) ;
731
731
}
732
732
}
0 commit comments