Introduce comparing with namespace support.
This commit is contained in:
parent
04ec34bed8
commit
1b1661fd82
16 changed files with 156 additions and 20 deletions
|
|
@ -47,7 +47,8 @@ impl TryFrom<Element> for JingleMI {
|
|||
type Err = Error;
|
||||
|
||||
fn try_from(elem: Element) -> Result<JingleMI, Error> {
|
||||
if elem.ns() != Some(ns::JINGLE_MESSAGE) {
|
||||
let ns = elem.ns();
|
||||
if ns.as_ref().map(|ns| ns.as_str()) != Some(ns::JINGLE_MESSAGE) {
|
||||
return Err(Error::ParseError("This is not a Jingle message element."));
|
||||
}
|
||||
Ok(match elem.name() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue