From dd315ba8ca5ef20229843036672605c29a984e60 Mon Sep 17 00:00:00 2001 From: Indradb <60851042+Indra-db@users.noreply.github.com> Date: Tue, 15 Oct 2024 15:22:31 +0900 Subject: [PATCH] add #[must_use] for fn cloned --- flecs_ecs/src/core/entity_view/entity_view_const.rs | 1 + flecs_ecs/src/core/world.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/flecs_ecs/src/core/entity_view/entity_view_const.rs b/flecs_ecs/src/core/entity_view/entity_view_const.rs index 1a10a33d..413a627d 100644 --- a/flecs_ecs/src/core/entity_view/entity_view_const.rs +++ b/flecs_ecs/src/core/entity_view/entity_view_const.rs @@ -1027,6 +1027,7 @@ impl<'a> EntityView<'a> { /// assert_eq!(pos.x, 10.0); /// assert_eq!(tag_pos_rel.x, 30.0); /// ``` + #[must_use] pub fn cloned(self) -> T::TupleType<'a> { let record = unsafe { sys::ecs_record_find(self.world.world_ptr(), *self.id) }; diff --git a/flecs_ecs/src/core/world.rs b/flecs_ecs/src/core/world.rs index f8133219..ca3d0887 100644 --- a/flecs_ecs/src/core/world.rs +++ b/flecs_ecs/src/core/world.rs @@ -1951,6 +1951,7 @@ impl World { /// # See also /// /// * [`World::get()`] + #[must_use] pub fn cloned(&self) -> T::ActualType where T::OnlyType: ComponentOrPairId,