mirror of
https://github.com/bytedream/serde-inline-default.git
synced 2026-11-04 15:12:09 +01:00
feat: add support for named enum variant fields (#15)
This commit is contained in:
1 parent
017080244a
commit
ce70ea4365
5 files changed
+132
-48
No files matched your search
+2
-1
@@ -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"),
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user