Make variant name for derived enums upper case by default
This commit is contained in:
parent
8a27cb3cb5
commit
c27d2c7a23
1 changed files with 1 additions and 1 deletions
|
@ -99,7 +99,7 @@ pub fn impl_enum(ast: &syn::DeriveInput) -> Tokens {
|
||||||
let var_ident = &variant.ident;
|
let var_ident = &variant.ident;
|
||||||
|
|
||||||
// Build value.
|
// Build value.
|
||||||
let name = var_attrs.name.unwrap_or(variant.ident.to_string());
|
let name = var_attrs.name.unwrap_or(variant.ident.as_ref().to_uppercase());
|
||||||
let descr = match var_attrs.description {
|
let descr = match var_attrs.description {
|
||||||
Some(s) => quote!{ Some(#s.to_string()) },
|
Some(s) => quote!{ Some(#s.to_string()) },
|
||||||
None => quote!{ None },
|
None => quote!{ None },
|
||||||
|
|
Loading…
Reference in a new issue