ecaps2: Remove the last clone.

This commit is contained in:
Emmanuel Gil Peyrot 2017-05-25 00:04:37 +01:00
parent 9bb65ea8fb
commit b172a6e05c

View file

@ -48,11 +48,11 @@ impl TryFrom<Element> for ECaps2 {
} }
impl Into<Element> for ECaps2 { impl Into<Element> for ECaps2 {
fn into(self) -> Element { fn into(mut self) -> Element {
Element::builder("c") Element::builder("c")
.ns(ns::ECAPS2) .ns(ns::ECAPS2)
.append(self.hashes.iter() .append(self.hashes.drain(..)
.map(|hash| hash.clone().into()) .map(|hash| hash.into())
.collect::<Vec<Element>>()) .collect::<Vec<Element>>())
.build() .build()
} }