Add a new check_no_attributes macro, to avoid the empty list.
This commit is contained in:
parent
1892e1ca04
commit
f85b451fcf
4 changed files with 13 additions and 7 deletions
|
|
@ -40,7 +40,7 @@ impl TryFrom<Element> for ChatState {
|
|||
fn try_from(elem: Element) -> Result<ChatState, Error> {
|
||||
check_ns_only!(elem, "chatstate", ns::CHATSTATES);
|
||||
check_no_children!(elem, "chatstate");
|
||||
check_no_unknown_attributes!(elem, "chatstate", []);
|
||||
check_no_attributes!(elem, "chatstate");
|
||||
Ok(match elem.name() {
|
||||
"active" => ChatState::Active,
|
||||
"composing" => ChatState::Composing,
|
||||
|
|
|
|||
Loading…
Reference in a new issue