From b172a6e05ca7d7fcffb9accb2a6919d816f1dea1 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Thu, 25 May 2017 00:04:37 +0100 Subject: [PATCH] ecaps2: Remove the last clone. --- src/ecaps2.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ecaps2.rs b/src/ecaps2.rs index ac9df22..57577ca 100644 --- a/src/ecaps2.rs +++ b/src/ecaps2.rs @@ -48,11 +48,11 @@ impl TryFrom for ECaps2 { } impl Into for ECaps2 { - fn into(self) -> Element { + fn into(mut self) -> Element { Element::builder("c") .ns(ns::ECAPS2) - .append(self.hashes.iter() - .map(|hash| hash.clone().into()) + .append(self.hashes.drain(..) + .map(|hash| hash.into()) .collect::>()) .build() }