From 0679518d68d3bf170939eb7f2af722796013a250 Mon Sep 17 00:00:00 2001 From: Nasr Date: Mon, 3 Jun 2024 13:25:31 -0400 Subject: [PATCH] fmt --- crates/dojo-bindgen/src/plugins/unity/mod.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/crates/dojo-bindgen/src/plugins/unity/mod.rs b/crates/dojo-bindgen/src/plugins/unity/mod.rs index cd77071ac3..cad76a3c0d 100644 --- a/crates/dojo-bindgen/src/plugins/unity/mod.rs +++ b/crates/dojo-bindgen/src/plugins/unity/mod.rs @@ -240,7 +240,7 @@ public class {} : ModelInstance {{ handled_tokens: &[Composite], ) -> String { let mapped_type = UnityPlugin::map_type(token); - + match handled_tokens.iter().find(|t| t.type_name() == token.type_name()) { Some(t) => { // Need to flatten the struct members. @@ -269,7 +269,7 @@ public class {} : ModelInstance {{ None => match mapped_type.as_str() { "FieldElement" => format!("calldata.Add({}.Inner);", type_name), _ => format!("calldata.Add(new FieldElement({}).Inner);", type_name), - } + }, } } @@ -283,9 +283,7 @@ public class {} : ModelInstance {{ let calldata = system .inputs .iter() - .map(|(name, token)| { - handle_arg_recursive(name, token, handled_tokens) - }) + .map(|(name, token)| handle_arg_recursive(name, token, handled_tokens)) .collect::>() .join("\n\t\t");