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,