Use check_no_children!() where it makes sense.
This commit is contained in:
parent
93b018e5ac
commit
3d495ccf41
6 changed files with 13 additions and 37 deletions
|
|
@ -33,9 +33,7 @@ fn get_sid(elem: Element) -> Result<SessionId, Error> {
|
|||
}
|
||||
|
||||
fn check_empty_and_get_sid(elem: Element) -> Result<SessionId, Error> {
|
||||
for _ in elem.children() {
|
||||
return Err(Error::ParseError("Unknown child in Jingle message element."));
|
||||
}
|
||||
check_no_children!(elem, "Jingle message");
|
||||
get_sid(elem)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue