Skip to content

Commit

Permalink
fix: variant not found case handling
Browse files Browse the repository at this point in the history
  • Loading branch information
crnbarr93 committed Dec 27, 2024
1 parent 0a35200 commit 81e1565
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/std/macros/src/attrs/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub(crate) fn generate_match_pattern(
.variants
.iter()
.find(|v| v.ident == *variant_name)
.unwrap();
.expect("Variant not found. Make sure the variant name matches the enum definition.");

match &variant.fields {
syn::Fields::Named(_) => quote! { Self::#variant_name { .. } },
Expand Down

0 comments on commit 81e1565

Please sign in to comment.