feat: add support for named enum variant fields (#15)

This commit is contained in:
2026-01-24 14:09:07 +01:00
parent 017080244a
commit ce70ea4365
5 changed files with 132 additions and 48 deletions

View File

@@ -37,6 +37,7 @@ pub fn serde_inline_default(_attr: TokenStream, input: TokenStream) -> TokenStre
match item {
Item::Struct(s) => expand::expand_struct(s),
_ => panic!("can only be used on structs"),
Item::Enum(e) => expand::expand_enum(e),
_ => panic!("can only be used on structs and enums"),
}
}