Skip to content

Commit

Permalink
update function parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
ss2165 committed Jul 28, 2023
1 parent e555d15 commit 76581d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ impl OpDef {
pub fn new_with_yaml_types(
name: SmolStr,
description: String,
args: Vec<TypeParam>,
params: Vec<TypeParam>,
misc: HashMap<String, serde_yaml::Value>,
inputs: String, // TODO this is likely the wrong type
outputs: String, // TODO similarly
Expand All @@ -179,7 +179,7 @@ impl OpDef {
resource: Default::default(), // Currently overwritten when OpDef added to Resource
name,
description,
params: args,
params,
misc,
signature_func: SignatureFunc::FromYAML { inputs, outputs },
lower_funcs: Vec::new(),
Expand All @@ -190,15 +190,15 @@ impl OpDef {
pub fn new_with_custom_sig(
name: SmolStr,
description: String,
args: Vec<TypeParam>,
params: Vec<TypeParam>,
misc: HashMap<String, serde_yaml::Value>,
sig_func: impl CustomSignatureFunc + 'static,
) -> Self {
Self {
resource: Default::default(), // Currently overwritten when OpDef added to Resource
name,
description,
params: args,
params,
misc,
signature_func: SignatureFunc::CustomFunc(Box::new(sig_func)),
lower_funcs: Vec::new(),
Expand Down
4 changes: 2 additions & 2 deletions src/types/custom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ pub struct CustomType {

impl CustomType {
/// Creates a new opaque type.
pub fn new(id: impl Into<SmolStr>, params: impl Into<Vec<TypeArg>>) -> Self {
pub fn new(id: impl Into<SmolStr>, args: impl Into<Vec<TypeArg>>) -> Self {
Self {
id: id.into(),
args: params.into(),
args: args.into(),
}
}

Expand Down

0 comments on commit 76581d1

Please sign in to comment.