From e2ec96e44a54ab9bf02fa5a71ce35cd882bcf414 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Mon, 1 Jan 2024 23:52:07 +0100 Subject: [PATCH] Fixes for gpui2_macros --- crates/gpui2_macros/src/style_helpers.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/gpui2_macros/src/style_helpers.rs b/crates/gpui2_macros/src/style_helpers.rs index 181311807c..b86bb2dfa6 100644 --- a/crates/gpui2_macros/src/style_helpers.rs +++ b/crates/gpui2_macros/src/style_helpers.rs @@ -102,7 +102,7 @@ fn generate_methods() -> Vec { fn generate_predefined_setter( name: &'static str, length: &'static str, - fields: &Vec, + fields: &[TokenStream2], length_tokens: &TokenStream2, negate: bool, doc_string: &str, @@ -143,12 +143,12 @@ fn generate_predefined_setter( fn generate_custom_value_setter( prefix: &'static str, length_type: TokenStream2, - fields: &Vec, + fields: &[TokenStream2], doc_string: &str, ) -> TokenStream2 { let method_name = format_ident!("{}", prefix); - let mut iter = fields.into_iter(); + let mut iter = fields.iter(); let last = iter.next_back().unwrap(); let field_assignments = iter .map(|field_tokens| {