From 984e2ee726ed4517a7af4d23ee7d61040e288071 Mon Sep 17 00:00:00 2001 From: Orchaldir Date: Sat, 28 Oct 2023 17:17:12 +0200 Subject: [PATCH] [#43] MR --- macro_ui/src/utils.rs | 8 ++++---- rpg_tools_core/src/ui/editor.rs | 4 ++-- rpg_tools_rendering/src/rendering/equipment/footwear.rs | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/macro_ui/src/utils.rs b/macro_ui/src/utils.rs index 22d89b8e..d0410b2c 100644 --- a/macro_ui/src/utils.rs +++ b/macro_ui/src/utils.rs @@ -14,10 +14,10 @@ pub fn get_option_type(field: &Field) -> Option { if let Some(segment) = type_path.path.segments.first() { return match &segment.arguments { PathArguments::AngleBracketed(args) => { - if let Some(GenericArgument::Type(t)) = args.args.first() { - if let Type::Path(type_path) = t { - return type_path.path.segments.first().map(|s| s.ident.clone()); - } + if let Some(GenericArgument::Type(Type::Path(type_path))) = + args.args.first() + { + return type_path.path.segments.first().map(|s| s.ident.clone()); } None } diff --git a/rpg_tools_core/src/ui/editor.rs b/rpg_tools_core/src/ui/editor.rs index 70abd809..b8dce5cb 100644 --- a/rpg_tools_core/src/ui/editor.rs +++ b/rpg_tools_core/src/ui/editor.rs @@ -111,7 +111,7 @@ impl UiVisitor for EditorVisitor { self.add_named_selection( &format!("{} Availability", self.get_pretty_name()), &format!("{}.availability", self.get_path()), - &vec!["true".to_string(), "false".to_string()], + &["true".to_string(), "false".to_string()], "\"true\"", ); let name = self.get_name(); @@ -124,7 +124,7 @@ impl UiVisitor for EditorVisitor { self.add_named_selection( &format!("{} Availability", self.get_pretty_name()), &format!("{}.availability", self.get_path()), - &vec!["true".to_string(), "false".to_string()], + &["true".to_string(), "false".to_string()], "\"false\"", ); self.lines.push(format!("{}{{% endif %}}", self.spaces)); diff --git a/rpg_tools_rendering/src/rendering/equipment/footwear.rs b/rpg_tools_rendering/src/rendering/equipment/footwear.rs index 36dab311..34656777 100644 --- a/rpg_tools_rendering/src/rendering/equipment/footwear.rs +++ b/rpg_tools_rendering/src/rendering/equipment/footwear.rs @@ -83,7 +83,7 @@ fn render_shaft( builder.add_horizontal_pair(aabb, width, center_x, y_end, true); let polygon = builder.build(); - renderer.render_polygon(&polygon, &options); + renderer.render_polygon(&polygon, options); } fn render_soles(