fix: break from the loop after matching enum variant
This commit is contained in:
parent
efdab555e1
commit
37b0ae263b
@ -112,6 +112,7 @@ fn parse_variant(variant: &syn::Variant, name: &Ident) -> Option<TokenStream> {
|
|||||||
Fields::Unit => Some(quote! {
|
Fields::Unit => Some(quote! {
|
||||||
#xml_element_name => {
|
#xml_element_name => {
|
||||||
enum_value = ::std::option::Option::Some(#variant_name);
|
enum_value = ::std::option::Option::Some(#variant_name);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
Fields::Unnamed(ref fields) => {
|
Fields::Unnamed(ref fields) => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user