From 2a6b544a0aa3471b0abb185a367cb25b98042912 Mon Sep 17 00:00:00 2001 From: Kewei Huang Date: Wed, 5 Oct 2022 12:21:09 +0000 Subject: [PATCH] Document `EntityMut::remove()` (#6168) # Objective - Fixes #5990 ## Solution - Add docs for `EntityMut::remove()` explaining its return value. --- crates/bevy_ecs/src/world/entity_ref.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs index 91707e381c..b532387c57 100644 --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -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(&mut self) -> Option { let archetypes = &mut self.world.archetypes; let storages = &mut self.world.storages;