File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
crates/bevy_ecs/src/world Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -281,9 +281,10 @@ impl<'w> EntityMut<'w> {
281281
282282 /// Removes the components in the [`Bundle`] from the entity and returns their previous values.
283283 ///
284- /// **Note:** This will not remove any components and will return `None` if the entity does not
285- /// have all components in the bundle .
284+ /// **Note:** If the entity does not have every component in the bundle,
285+ /// this method will not remove any of them .
286286 // TODO: BundleRemover?
287+ #[ must_use]
287288 pub fn take < T : Bundle > ( & mut self ) -> Option < T > {
288289 let archetypes = & mut self . world . archetypes ;
289290 let storages = & mut self . world . storages ;
@@ -409,7 +410,7 @@ impl<'w> EntityMut<'w> {
409410 entities. set ( entity. index ( ) , new_location) ;
410411 }
411412
412- /// Removes the components in the [`Bundle`] from the entity.
413+ /// Removes any components in the [`Bundle`] from the entity.
413414 // TODO: BundleRemover?
414415 pub fn remove < T : Bundle > ( & mut self ) {
415416 let archetypes = & mut self . world . archetypes ;
You can’t perform that action at this time.
0 commit comments