Skip to content

Commit

Permalink
chore: Rename token stream variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Techassi committed Sep 24, 2024
1 parent d7658df commit c04023a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/stackable-versioned-macros/src/codegen/vstruct/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,12 @@ impl VersionedStruct {
let enum_ident = &self.idents.kubernetes;
let enum_vis = &self.visibility;

let mut enum_variant_matches = TokenStream::new();
let mut enum_display_impl_matches = TokenStream::new();
let mut enum_variant_idents = TokenStream::new();

for (enum_variant_ident, enum_variant_display) in enum_variants {
enum_variant_idents.extend(quote! {#enum_variant_ident,});
enum_variant_matches.extend(quote! {
enum_display_impl_matches.extend(quote! {
#enum_ident::#enum_variant_ident => f.write_str(#enum_variant_display),
});
}
Expand All @@ -342,7 +342,7 @@ impl VersionedStruct {
impl ::std::fmt::Display for #enum_ident {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::result::Result<(), ::std::fmt::Error> {
match self {
#enum_variant_matches
#enum_display_impl_matches
}
}
}
Expand Down

0 comments on commit c04023a

Please sign in to comment.