[librsvg: 22/43] xml: use "copied()"



commit e5024648b29cb45e349c260f6b4076f86bfccaff
Author: Paolo Borelli <pborelli gnome org>
Date:   Sun Oct 13 12:25:50 2019 +0200

    xml: use "copied()"

 rsvg_internals/src/xml.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/rsvg_internals/src/xml.rs b/rsvg_internals/src/xml.rs
index 2c6b8b41..957f8db9 100644
--- a/rsvg_internals/src/xml.rs
+++ b/rsvg_internals/src/xml.rs
@@ -286,7 +286,7 @@ impl XmlState {
     }
 
     pub fn entity_lookup(&self, entity_name: &str) -> Option<XmlEntityPtr> {
-        self.inner.borrow().entities.get(entity_name).map(|v| *v)
+        self.inner.borrow().entities.get(entity_name).copied()
     }
 
     pub fn entity_insert(&self, entity_name: &str, entity: XmlEntityPtr) {


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