Skip to content

Commit

Permalink
Document EntityMut::remove() (#6168)
Browse files Browse the repository at this point in the history
# Objective

- Fixes #5990

## Solution

- Add docs for `EntityMut::remove()` explaining its return value.
  • Loading branch information
xgbwei committed Oct 5, 2022
1 parent 29098b7 commit 2a6b544
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/bevy_ecs/src/world/entity_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ impl<'w> EntityMut<'w> {
}

// TODO: move to BundleInfo
/// Removes a [`Bundle`] of components from the entity and returns the bundle.
///
/// Returns `None` if the entity does not contain the bundle.
pub fn remove<T: Bundle>(&mut self) -> Option<T> {
let archetypes = &mut self.world.archetypes;
let storages = &mut self.world.storages;
Expand Down

0 comments on commit 2a6b544

Please sign in to comment.