Prefer Array deser to Term deser

This commit is contained in:
asonix 2020-03-14 14:17:10 -05:00
parent 8e6950b549
commit 0cafe502f2

View file

@ -540,8 +540,8 @@ pub fn properties(tokens: TokenStream) -> TokenStream {
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
#[serde(untagged)] #[serde(untagged)]
pub enum #enum_ty { pub enum #enum_ty {
Term(#ty),
Array(Vec<#ty>), Array(Vec<#ty>),
Term(#ty),
} }
impl Default for #enum_ty { impl Default for #enum_ty {
@ -623,8 +623,8 @@ pub fn properties(tokens: TokenStream) -> TokenStream {
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
#[serde(untagged)] #[serde(untagged)]
pub enum #ty { pub enum #ty {
Term(#term_ty),
Array(Vec<#term_ty>), Array(Vec<#term_ty>),
Term(#term_ty),
} }
impl Default for #ty { impl Default for #ty {