From 070227ea03bd8e983d1a8b46956083d1b584a1c8 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Thu, 25 May 2017 00:30:00 +0100 Subject: [PATCH] eme: Remove two clones. --- src/eme.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/eme.rs b/src/eme.rs index edf6cd3..fe97386 100644 --- a/src/eme.rs +++ b/src/eme.rs @@ -28,11 +28,9 @@ impl TryFrom for ExplicitMessageEncryption { for _ in elem.children() { return Err(Error::ParseError("Unknown child in encryption element.")); } - let namespace = get_attr!(elem, "namespace", required); - let name = get_attr!(elem, "name", optional); Ok(ExplicitMessageEncryption { - namespace: namespace, - name: name, + namespace: get_attr!(elem, "namespace", required), + name: get_attr!(elem, "name", optional), }) } } @@ -41,8 +39,8 @@ impl Into for ExplicitMessageEncryption { fn into(self) -> Element { Element::builder("encryption") .ns(ns::EME) - .attr("namespace", self.namespace.clone()) - .attr("name", self.name.clone()) + .attr("namespace", self.namespace) + .attr("name", self.name) .build() } }