Validate extra action keys

pull/39/head
Takashi Kokubun 3 years ago
parent db1c9f5600
commit ae7d2deff4
No known key found for this signature in database
GPG Key ID: 6FFC433B12EE23DD

@ -61,6 +61,9 @@ impl<'de> Deserialize<'de> for Action {
}
None => return serde_error::<Self::Value, M>("missing action"),
};
if let Some(key) = map.next_key::<String>()? {
return serde_error::<Self::Value, M>(&format!("only one action key is expected but also got: {}", key));
}
Ok(action)
}
}

Loading…
Cancel
Save