From faeb7617eee6389807843dd214e5464f9963af21 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Wed, 6 Nov 2024 10:01:50 +0000 Subject: [PATCH] chore: tidy up code --- build.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/build.rs b/build.rs index 10f8bd2..bf503fa 100644 --- a/build.rs +++ b/build.rs @@ -310,10 +310,8 @@ fn make_flavor_ansi_colors_all_impl(sample_flavor: &Flavor) -> TokenStream { let ident = format_ident!("{identifier}"); quote! { &self.#ident } }); - let ansi_color_pairs = ansi_color_pairs_in_order(sample_flavor).map(|(identifier, color_pair)| { - let entry = make_ansi_color_pair_entry(identifier, color_pair); - entry - }); + let ansi_color_pairs = ansi_color_pairs_in_order(sample_flavor) + .map(|(identifier, color_pair)| make_ansi_color_pair_entry(identifier, color_pair)); quote! { impl FlavorAnsiColors { /// Get an array of the ANSI colors in the flavor. @@ -324,6 +322,7 @@ fn make_flavor_ansi_colors_all_impl(sample_flavor: &Flavor) -> TokenStream { ] } + /// #[must_use] pub const fn to_ansi_color_pairs(&self) -> FlavorAnsiColorPairs { FlavorAnsiColorPairs {