iq: Remove a panic!

This commit is contained in:
Emmanuel Gil Peyrot 2017-05-19 00:10:23 +01:00
parent 6df3c4a679
commit dcb7ac8db2

View file

@ -145,7 +145,7 @@ impl<'a> TryFrom<&'a Element> for Iq {
return Err(Error::ParseError("Wrong number of children in iq element.")); return Err(Error::ParseError("Wrong number of children in iq element."));
} }
} else { } else {
panic!() return Err(Error::ParseError("Unknown iq type."));
}; };
Ok(Iq { Ok(Iq {