Clean up mesh.rs

This commit is contained in:
mars 2022-04-18 20:20:35 -06:00
parent 8a3dac008a
commit 257acf56d2
1 changed files with 2 additions and 2 deletions

View File

@ -92,7 +92,7 @@ impl AttrStore {
/// existing [AttrId].
pub fn get_type<T: 'static + Attribute>(&self) -> AttrId {
let type_id = TypeId::of::<T>();
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<AttrInfo> {
self.attributes.read().unwrap().get(id.0).map(|v| v.clone())
self.attributes.read().unwrap().get(id.0).copied()
}
}