[librsvg: 1/5] Be explicit about cloning the reference in PropertyBagIter




commit c3f2804d5c945591fbc6c9efa10e7a906541d553
Author: Sven Neumann <sven svenfoo org>
Date:   Mon Aug 24 22:48:29 2020 +0200

    Be explicit about cloning the reference in PropertyBagIter
    
    See https://rust-lang.github.io/rust-clippy/master/index.html#clone_double_ref

 rsvg_internals/src/property_bag.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/rsvg_internals/src/property_bag.rs b/rsvg_internals/src/property_bag.rs
index 5b0448ae..379a5c35 100644
--- a/rsvg_internals/src/property_bag.rs
+++ b/rsvg_internals/src/property_bag.rs
@@ -99,7 +99,7 @@ impl<'a> Iterator for PropertyBagIter<'a> {
     type Item = (QualName, &'a str);
 
     fn next(&mut self) -> Option<Self::Item> {
-        self.0.next().map(|(a, v)| (a.clone(), v.clone()))
+        self.0.next().map(|(a, v)| (a.clone(), <&str>::clone(v)))
     }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]