Skip to content

Commit

Permalink
fix: update unity systsem bindgen to use new felt getter #2008
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkooo committed May 28, 2024
1 parent f08e2c3 commit bf4cf0d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions crates/dojo-bindgen/src/plugins/unity/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,21 +256,18 @@ public class {} : ModelInstance {{
.inners
.iter()
.map(|field| {
format!(
"new FieldElement({}.{}).Inner()",
type_name, field.name
)
format!("new FieldElement({}.{}).Inner", type_name, field.name)
})
.collect::<Vec<String>>()
.join(",\n "),
_ => {
format!("new FieldElement({}).Inner()", type_name)
format!("new FieldElement({}).Inner", type_name)
}
}
}
None => match UnityPlugin::map_type(token).as_str() {
"FieldElement" => format!("{}.Inner()", type_name),
_ => format!("new FieldElement({}).Inner()", type_name),
"FieldElement" => format!("{}.Inner", type_name),
_ => format!("new FieldElement({}).Inner", type_name),

Check warning on line 270 in crates/dojo-bindgen/src/plugins/unity/mod.rs

View check run for this annotation

Codecov / codecov/patch

crates/dojo-bindgen/src/plugins/unity/mod.rs#L268-L270

Added lines #L268 - L270 were not covered by tests
},
}
})
Expand Down

0 comments on commit bf4cf0d

Please sign in to comment.