From cbed21f5e6cfb449d49087cedc867c8e50721ba9 Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 24 Sep 2025 22:16:50 +0200 Subject: refactor(ecs): replace Pair ctor functions with builder --- ecs/src/component/local.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'ecs/src/component/local.rs') diff --git a/ecs/src/component/local.rs b/ecs/src/component/local.rs index 6b2463f..b19a30b 100644 --- a/ecs/src/component/local.rs +++ b/ecs/src/component/local.rs @@ -37,7 +37,11 @@ where }; let Some(local_component) = system_ent.get_with_id_mut::( - Pair::new::(LocalComponent::id()).id(), + Pair::builder() + .relation::() + .target::() + .build() + .id(), ) else { panic!( "Local component {} of system with ID {} is uninitialized", @@ -60,7 +64,11 @@ where fn initialize(system: &mut SystemT, input: Self::Input) { system.add_local_component( - Pair::new_with_comp_target::(input).into_parts(), + Pair::builder() + .relation::() + .target_as_data(input) + .build() + .into_parts(), ); } } -- cgit v1.2.3-18-g5258