caio.co/de/cantine

Strict derived Query types deserialization

Id
2154f878d4966c8d1fccc81be971ce55233fd936
Author
Caio
Commit time
2020-01-10T18:29:48+01:00

Modified tique_derive/src/lib.rs

@@ -267,6 +267,7

quote! {
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, Clone)]
+ #[serde(deny_unknown_fields)]
pub struct #name {
#(#query_fields),*
}
@@ -330,6 +331,7

quote! {
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, Clone, PartialEq)]
+ #[serde(deny_unknown_fields)]
pub struct #name {
#(#fields),*
}