-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - Add despawn_recursive to EntityMut #2855
[Merged by Bors] - Add despawn_recursive to EntityMut #2855
Conversation
/// Despawns the provided entity and its children. | ||
fn despawn_recursive(mut self) { | ||
let entity = self.id(); | ||
unsafe { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should have a // SAFE: rationale
comment above it explaining why this is safe in relationship to the requirements of self.world_mut()
(ex: EntityMut is consumed so even though the location is no longer valid, it cannot be accessed again with the invalid location).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll just copy that rationale in.
bors r+ |
No description provided.