From 2369461c591d4ec169ad2d46dc7c886dce6715e0 Mon Sep 17 00:00:00 2001 From: NightEule5 <24661563+NightEule5@users.noreply.github.com> Date: Sat, 11 Nov 2023 13:07:03 -0700 Subject: [PATCH] Rename to append_lifetimes_and_generics --- src/generate/impl_for.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/generate/impl_for.rs b/src/generate/impl_for.rs index 1c49e6e..67ebc1c 100644 --- a/src/generate/impl_for.rs +++ b/src/generate/impl_for.rs @@ -286,7 +286,7 @@ impl ImplFor<'_, P> { if let Some(generics) = self.generator.generics() { builder.append(generics.impl_generics_with_additional_lifetimes(lifetimes)); } else { - append_generics(builder, lifetimes, &[]); + append_lifetimes_and_generics(builder, lifetimes, &[]); } } else if let Some(generics) = self.generator.generics() { builder.append(generics.impl_generics()); @@ -296,7 +296,7 @@ impl ImplFor<'_, P> { let lifetimes = self.lifetimes.as_deref().unwrap_or_default(); let generics = self.generics.as_deref().unwrap_or_default(); - append_generics(builder, lifetimes, generics); + append_lifetimes_and_generics(builder, lifetimes, generics); builder.ident_str("for"); } builder.push_parsed(self.type_name.to_string()).unwrap(); @@ -311,7 +311,11 @@ impl ImplFor<'_, P> { } } -fn append_generics(builder: &mut StreamBuilder, lifetimes: &[String], generics: &[String]) { +fn append_lifetimes_and_generics( + builder: &mut StreamBuilder, + lifetimes: &[String], + generics: &[String], +) { if lifetimes.is_empty() && generics.is_empty() { return; }