Add a new check_no_attributes macro, to avoid the empty list.

This commit is contained in:
Emmanuel Gil Peyrot 2017-10-31 15:47:38 +00:00
commit f85b451fcf
4 changed files with 13 additions and 7 deletions

View file

@ -143,7 +143,7 @@ impl TryFrom<Element> for PubSubEvent {
fn try_from(elem: Element) -> Result<PubSubEvent, Error> {
check_self!(elem, "event", ns::PUBSUB_EVENT);
check_no_unknown_attributes!(elem, "event", []);
check_no_attributes!(elem, "event");
let mut payload = None;
for child in elem.children() {