Merge pull request #147 from lifichi/patch-1
fix: break from the loop after matching enum variant
This commit is contained in:
commit
2f395e2bca
@ -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