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
|
|
@ -29,9 +29,7 @@ impl TryFrom<Element> for Query {
|
|||
type Err = Error;
|
||||
|
||||
fn try_from(elem: Element) -> Result<Query, Error> {
|
||||
if !elem.is("query", ns::REGISTER) {
|
||||
return Err(Error::ParseError("This is not an ibr element."));
|
||||
}
|
||||
check_self!(elem, "query", ns::REGISTER, "IBR query");
|
||||
let mut query = Query {
|
||||
registered: false,
|
||||
fields: HashMap::new(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue