Skip to content

Commit

Permalink
Rename to append_lifetimes_and_generics
Browse files Browse the repository at this point in the history
  • Loading branch information
NightEule5 committed Nov 11, 2023
1 parent 9f06493 commit 3f58bc6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/generate/impl_for.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ impl<P: Parent> 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());
Expand All @@ -296,7 +296,7 @@ impl<P: Parent> 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();
Expand All @@ -311,7 +311,7 @@ impl<P: Parent> 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;
}
Expand Down

0 comments on commit 3f58bc6

Please sign in to comment.