Tuple enums
This commit is contained in:
parent
3be97a7da4
commit
8b034f4dd8
1 changed files with 6 additions and 1 deletions
|
@ -94,7 +94,12 @@ fn schema_for_enum(variants: &[Variant]) -> TokenStream {
|
||||||
gen.subschema_for::<#ty>()
|
gen.subschema_for::<#ty>()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Style::Tuple => unimplemented!("work in progress!"),
|
Style::Tuple => {
|
||||||
|
let types = variant.fields.iter().map(|f| f.ty);
|
||||||
|
quote! {
|
||||||
|
gen.subschema_for::<(#(#types),*)>()
|
||||||
|
}
|
||||||
|
}
|
||||||
Style::Struct => unimplemented!("work in progress!"),
|
Style::Struct => unimplemented!("work in progress!"),
|
||||||
Style::Unit => unreachable!("Unit variants already filtered out"),
|
Style::Unit => unreachable!("Unit variants already filtered out"),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue