summaryrefslogtreecommitdiff
path: root/ecs/src/util.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2025-10-15 15:34:21 +0200
committerHampusM <hampus@hampusmat.com>2025-10-15 15:34:21 +0200
commitb3bc691aedb46519e36db8e9eba0e37ac3cefb4a (patch)
tree362875d247f10c888b9de8bc7bdaebd7d86a4e64 /ecs/src/util.rs
parent6ed1d5a9b0723049a15dc7896e34e5cd650f62c7 (diff)
refactor(ecs): make fn arg to insert_at_part_pt_by_key return ref
Diffstat (limited to 'ecs/src/util.rs')
-rw-r--r--ecs/src/util.rs4
1 files changed, 2 insertions, 2 deletions
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,
{