Skip to content

Commit 803380d

Browse files
committed
Rename Union to UnionFields
1 parent d2f97a6 commit 803380d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

proc_macro_example_derive/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pub fn derive_reflective(input: TokenStream) -> TokenStream {
7474
quote!(get_variants),
7575
Box::new(variants.iter().map(|v| v.ident.to_string())),
7676
),
77-
RIT::Union(union) => get_item(
77+
RIT::UnionFields(union) => get_item(
7878
quote!(get_fields),
7979
Box::new(
8080
union

proc_macro_example_derive/src/reflective.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub enum ReflectiveInputType<'a> {
3636
// be one more type after the last comma token parsed. We take these things for granted as
3737
// users but this has to be addressed while we're parsing Rust code.
3838
Variants(&'a Punctuated<Variant, Token![,]>),
39-
Union(&'a FieldsNamed),
39+
UnionFields(&'a FieldsNamed),
4040
}
4141

4242
/// Wrapper around `syn::DeriveInput` with extra reflection functionality.
@@ -49,7 +49,7 @@ impl ReflectiveInput {
4949
match &self.0.data {
5050
Data::Struct(v) => RIT::Fields(&v.fields),
5151
Data::Enum(v) => RIT::Variants(&v.variants),
52-
Data::Union(v) => RIT::Union(&v.fields),
52+
Data::Union(v) => RIT::UnionFields(&v.fields),
5353
}
5454
}
5555
}

0 commit comments

Comments
 (0)