Change summary
src/data_forms.rs | 2 +-
src/ibr.rs | 4 ++--
src/message.rs | 4 ++--
src/presence.rs | 2 +-
src/roster.rs | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
Detailed changes
@@ -72,7 +72,7 @@ impl From<Field> for Element {
.attr("label", field.label)
.append(if field.required { Some(Element::builder("required").ns(ns::DATA_FORMS).build()) } else { None })
.append(field.options)
- .append(field.values.iter().map(|value| {
+ .append(field.values.into_iter().map(|value| {
Element::builder("value").ns(ns::DATA_FORMS).append(value).build()
}).collect::<Vec<_>>())
.append(field.media)
@@ -69,8 +69,8 @@ impl From<Query> for Element {
Element::builder("query")
.ns(ns::REGISTER)
.append(if query.registered { Some(Element::builder("registered").ns(ns::REGISTER)) } else { None })
- .append(query.fields.iter().map(|(name, value)| {
- Element::builder(name.clone()).ns(ns::REGISTER).append(value.clone())
+ .append(query.fields.into_iter().map(|(name, value)| {
+ Element::builder(name).ns(ns::REGISTER).append(value)
}).collect::<Vec<_>>())
.append(if query.remove { Some(Element::builder("remove").ns(ns::REGISTER)) } else { None })
.append(query.form)
@@ -207,7 +207,7 @@ impl From<Message> for Element {
.attr("to", message.to.and_then(|value| Some(String::from(value))))
.attr("id", message.id)
.attr("type", message.type_)
- .append(message.subjects.iter()
+ .append(message.subjects.into_iter()
.map(|(lang, subject)| {
Element::builder("subject")
.ns(ns::JABBER_CLIENT)
@@ -218,7 +218,7 @@ impl From<Message> for Element {
.append(subject)
.build() })
.collect::<Vec<_>>())
- .append(message.bodies.iter()
+ .append(message.bodies.into_iter()
.map(|(lang, body)| {
Element::builder("body")
.ns(ns::JABBER_CLIENT)
@@ -321,7 +321,7 @@ impl From<Presence> for Element {
.attr("id", presence.id)
.attr("type", presence.type_)
.append(presence.show)
- .append(presence.statuses.iter().map(|(lang, status)| {
+ .append(presence.statuses.into_iter().map(|(lang, status)| {
Element::builder("status")
.attr("xml:lang", match lang.as_ref() {
"" => None,
@@ -65,7 +65,7 @@ impl From<Item> for Element {
.attr("jid", String::from(item.jid))
.attr("name", item.name)
.attr("subscription", item.subscription)
- .append(item.groups.iter().map(|group| Element::builder("group").ns(ns::ROSTER).append(group)).collect::<Vec<_>>())
+ .append(item.groups.into_iter().map(|group| Element::builder("group").ns(ns::ROSTER).append(group)).collect::<Vec<_>>())
.build()
}
}