-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add into_ methods for EntityMut and EntityWorldMut that consume self. (…
…#12419) # Objective Provide component access to `&'w T`, `Ref<'w, T>`, `Mut<'w, T>`, `Ptr<'w>` and `MutUntyped<'w>` from `EntityMut<'w>`/`EntityWorldMut<'w>` with the world `'w` lifetime instead of `'_`. Fixes #12417 ## Solution Add `into_` prefixed methods for `EntityMut<'w>`/`EntityWorldMut<'w>` that consume `self` and returns component access with the world `'w` lifetime unlike the `get_` prefixed methods that takes `&'a self` and returns component access with `'a` lifetime. Methods implemented: - EntityMut::into_borrow - EntityMut::into_ref - EntityMut::into_mut - EntityMut::into_borrow_by_id - EntityMut::into_mut_by_id - EntityWorldMut::into_borrow - EntityWorldMut::into_ref - EntityWorldMut::into_mut - EntityWorldMut::into_borrow_by_id - EntityWorldMut::into_mut_by_id
- Loading branch information
Showing
1 changed file
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters