From b3bc691aedb46519e36db8e9eba0e37ac3cefb4a Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 15 Oct 2025 15:34:21 +0200 Subject: refactor(ecs): make fn arg to insert_at_part_pt_by_key return ref --- ecs/src/util.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ecs/src/util.rs') 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 fn insert_at_part_pt_by_key( &mut self, item: Item, - func: impl FnMut(&Item) -> Key, + func: impl FnMut(&Item) -> &Key, ) where Key: Ord; } @@ -21,7 +21,7 @@ impl VecExt for Vec fn insert_at_part_pt_by_key( &mut self, item: Item, - mut func: impl FnMut(&Item) -> Key, + mut func: impl FnMut(&Item) -> &Key, ) where Key: Ord, { -- cgit v1.2.3-18-g5258