From bc33fb777bc44bf8d3f963f1f1c62857723b82d8 Mon Sep 17 00:00:00 2001 From: Samuel Pastva Date: Mon, 2 Oct 2023 14:53:07 +0200 Subject: [PATCH] Remove useless copy. --- src/element.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/element.rs b/src/element.rs index 9b0e814..85d1f05 100644 --- a/src/element.rs +++ b/src/element.rs @@ -726,7 +726,7 @@ impl Element { /// ``` /// pub fn closest_prefix<'a>(&self, doc: &'a Document, namespace_url: &str) -> Option<&'a str> { - let mut search = self.clone(); + let mut search = *self; loop { let mut candidate: Option<&str> = None; for (prefix, url) in search.namespace_decls(doc) {