Cleanup a1ae45add8 a bit.
This commit is contained in:
parent
cdf80c8979
commit
ff77f6141f
18 changed files with 97 additions and 174 deletions
|
|
@ -8,7 +8,7 @@ use crate::util::error::Error;
|
|||
use crate::iq::IqSetPayload;
|
||||
use crate::ns;
|
||||
use jid::Jid;
|
||||
use minidom::{Element, Node};
|
||||
use minidom::Element;
|
||||
use std::collections::BTreeMap;
|
||||
use std::str::FromStr;
|
||||
use std::convert::TryFrom;
|
||||
|
|
@ -351,7 +351,8 @@ impl From<Reason> for Element {
|
|||
Reason::UnsupportedApplications => "unsupported-applications",
|
||||
Reason::UnsupportedTransports => "unsupported-transports",
|
||||
})
|
||||
.build()
|
||||
.ns(ns::JINGLE)
|
||||
.build()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -419,7 +420,6 @@ impl From<ReasonElement> for Element {
|
|||
.ns(ns::JINGLE)
|
||||
.attr("xml:lang", lang)
|
||||
.append(text)
|
||||
.build()
|
||||
}))
|
||||
.build()
|
||||
}
|
||||
|
|
@ -542,8 +542,8 @@ impl From<Jingle> for Element {
|
|||
.attr("initiator", jingle.initiator)
|
||||
.attr("responder", jingle.responder)
|
||||
.attr("sid", jingle.sid)
|
||||
.append_all(jingle.contents.into_iter())
|
||||
.append_all(jingle.reason.map(Element::from).map(Node::Element).into_iter())
|
||||
.append_all(jingle.contents)
|
||||
.append_all(jingle.reason.map(Element::from))
|
||||
.build()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue