diff --git a/src/mesh.rs b/src/mesh.rs index 2fea9d1..cef1596 100644 --- a/src/mesh.rs +++ b/src/mesh.rs @@ -92,7 +92,7 @@ impl AttrStore { /// existing [AttrId]. pub fn get_type(&self) -> AttrId { let type_id = TypeId::of::(); - let existing_id = self.types.read().unwrap().get(&type_id).map(|v| *v); + let existing_id = self.types.read().unwrap().get(&type_id).copied(); if let Some(id) = existing_id { id @@ -113,7 +113,7 @@ impl AttrStore { /// Gets the [AttrInfo] for an [AttrId]. pub fn get_info(&self, id: &AttrId) -> Option { - self.attributes.read().unwrap().get(id.0).map(|v| v.clone()) + self.attributes.read().unwrap().get(id.0).copied() } }