summaryrefslogtreecommitdiff
path: root/ecs/src
diff options
context:
space:
mode:
Diffstat (limited to 'ecs/src')
-rw-r--r--ecs/src/component/storage.rs4
-rw-r--r--ecs/src/event.rs4
-rw-r--r--ecs/src/util.rs4
3 files changed, 6 insertions, 6 deletions
diff --git a/ecs/src/component/storage.rs b/ecs/src/component/storage.rs
index 86e124f..a8711c5 100644
--- a/ecs/src/component/storage.rs
+++ b/ecs/src/component/storage.rs
@@ -644,7 +644,7 @@ impl<'component_storage> Iterator for ArchetypeRefIter<'component_storage, '_>
add_edge_archetype_comps
.insert_at_part_pt_by_key(add_edge_component_id, |comp_id| {
- *comp_id
+ comp_id
});
self.storage.imaginary_archetypes.borrow_mut().push(
@@ -712,7 +712,7 @@ impl ArchetypeRefIter<'_, '_>
let mut add_edge_comp_ids = imaginary_archetype_comps.to_vec();
- add_edge_comp_ids.insert_at_part_pt_by_key(unique_comp_id, |id| *id);
+ add_edge_comp_ids.insert_at_part_pt_by_key(unique_comp_id, |id| id);
let add_edge = ArchetypeId::new(&add_edge_comp_ids);
diff --git a/ecs/src/event.rs b/ecs/src/event.rs
index dffd327..15455b6 100644
--- a/ecs/src/event.rs
+++ b/ecs/src/event.rs
@@ -70,7 +70,7 @@ impl NewEvents
self.events.insert_at_part_pt_by_key(
(event_id, Matches { match_ids: Vec::from([match_id]) }),
- |(other_event_id, _)| *other_event_id,
+ |(other_event_id, _)| other_event_id,
);
}
@@ -100,6 +100,6 @@ impl Matches
}
self.match_ids
- .insert_at_part_pt_by_key(match_id, |other_match_id| *other_match_id);
+ .insert_at_part_pt_by_key(match_id, |other_match_id| other_match_id);
}
}
diff --git a/ecs/src/util.rs b/ecs/src/util.rs
index dc670e7..c18fd49 100644
--- a/ecs/src/util.rs
+++ b/ecs/src/util.rs
@@ -11,7 +11,7 @@ pub trait VecExt<Item>
fn insert_at_part_pt_by_key<Key>(
&mut self,
item: Item,
- func: impl FnMut(&Item) -> Key,
+ func: impl FnMut(&Item) -> &Key,
) where
Key: Ord;
}
@@ -21,7 +21,7 @@ impl<Item> VecExt<Item> for Vec<Item>
fn insert_at_part_pt_by_key<Key>(
&mut self,
item: Item,
- mut func: impl FnMut(&Item) -> Key,
+ mut func: impl FnMut(&Item) -> &Key,
) where
Key: Ord,
{