Skip to content

Commit

Permalink
add #[must_use] for fn cloned
Browse files Browse the repository at this point in the history
  • Loading branch information
Indra-db committed Oct 15, 2024
1 parent f45d850 commit dd315ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions flecs_ecs/src/core/entity_view/entity_view_const.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T: ClonedTuple>(self) -> T::TupleType<'a> {
let record = unsafe { sys::ecs_record_find(self.world.world_ptr(), *self.id) };

Expand Down
1 change: 1 addition & 0 deletions flecs_ecs/src/core/world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1951,6 +1951,7 @@ impl World {
/// # See also
///
/// * [`World::get()`]
#[must_use]
pub fn cloned<T: ClonedTupleTypeOperation>(&self) -> T::ActualType
where
T::OnlyType: ComponentOrPairId,
Expand Down

0 comments on commit dd315ba

Please sign in to comment.