Cargo.toml: Update minidom to 0.4.3 to use its new IntoAttributeValue implementation on numbers.

This commit is contained in:
Emmanuel Gil Peyrot 2017-05-27 23:18:15 +01:00
parent 8e1d5e7983
commit 6794b34714
6 changed files with 9 additions and 12 deletions

View file

@ -10,7 +10,7 @@ categories = ["parsing", "network-programming"]
license = "MPL-2.0"
[dependencies]
minidom = "0.4.1"
minidom = "0.4.3"
jid = "0.2.0"
base64 = "0.5.0"
digest = "0.5.0"

View file

@ -113,7 +113,7 @@ impl Into<Element> for IBB {
IBB::Open { block_size, sid, stanza } => {
Element::builder("open")
.ns(ns::IBB)
.attr("block-size", format!("{}", block_size))
.attr("block-size", block_size)
.attr("sid", sid)
.attr("stanza", stanza)
.build()
@ -121,7 +121,7 @@ impl Into<Element> for IBB {
IBB::Data { seq, sid, data } => {
Element::builder("data")
.ns(ns::IBB)
.attr("seq", format!("{}", seq))
.attr("seq", seq)
.attr("sid", sid)
.append(base64::encode(&data))
.build()

View file

@ -24,11 +24,8 @@ impl IntoElements for Range {
fn into_elements(self, emitter: &mut ElementEmitter) {
let mut elem = Element::builder("range")
.ns(ns::JINGLE_FT)
.attr("offset", format!("{}", self.offset))
.attr("length", match self.length {
Some(length) => Some(format!("{}", length)),
None => None
})
.attr("offset", self.offset)
.attr("length", self.length)
.build();
for hash in self.hashes {
elem.append_child(hash.into());

View file

@ -43,7 +43,7 @@ impl Into<Element> for Transport {
fn into(self) -> Element {
Element::builder("transport")
.ns(ns::JINGLE_IBB)
.attr("block-size", format!("{}", self.block_size))
.attr("block-size", self.block_size)
.attr("sid", self.sid)
.attr("stanza", self.stanza)
.build()

View file

@ -70,8 +70,8 @@ impl Into<Element> for Candidate {
.attr("cid", self.cid)
.attr("host", self.host)
.attr("jid", self.jid)
.attr("port", match self.port { Some(port) => Some(format!("{}", port)), None => None })
.attr("priority", format!("{}", self.priority))
.attr("port", self.port)
.attr("priority", self.priority)
.attr("type", self.type_)
.build()
}

View file

@ -103,7 +103,7 @@ impl Into<Element> for Set {
if self.first.is_some() {
elem.append_child(Element::builder("first")
.ns(ns::RSM)
.attr("index", self.first_index.map(|index| format!("{}", index)))
.attr("index", self.first_index)
.append(self.first).build());
}
if self.index.is_some() {