Use check_self!() where it makes sense.
This commit is contained in:
parent
e0438f9b88
commit
6bb466eea2
12 changed files with 62 additions and 95 deletions
|
|
@ -22,9 +22,7 @@ impl TryFrom<Element> for Muc {
|
|||
type Err = Error;
|
||||
|
||||
fn try_from(elem: Element) -> Result<Muc, Error> {
|
||||
if !elem.is("x", ns::MUC) {
|
||||
return Err(Error::ParseError("This is not an x element."));
|
||||
}
|
||||
check_self!(elem, "x", ns::MUC);
|
||||
check_no_attributes!(elem, "x");
|
||||
|
||||
let mut password = None;
|
||||
|
|
|
|||
Loading…
Reference in a new issue