diff options
author | HampusM <hampus@hampusmat.com> | 2025-10-15 15:34:21 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2025-10-15 15:34:21 +0200 |
commit | b3bc691aedb46519e36db8e9eba0e37ac3cefb4a (patch) | |
tree | 362875d247f10c888b9de8bc7bdaebd7d86a4e64 /ecs/src/util.rs | |
parent | 6ed1d5a9b0723049a15dc7896e34e5cd650f62c7 (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.rs | 4 |
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, { |