Update crates/bevy_ecs/src/entity/mod.rs

This commit is contained in:
Eagster 2025-07-09 10:44:06 -04:00 committed by GitHub
parent 4c0d752547
commit ab0856bbf6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1033,7 +1033,7 @@ impl Entities {
/// This can error if the entity does not exist or if it is already constructed.
/// See the module docs for a more precise explanation of which entities exist and what construction means.
#[inline]
pub fn is_id_safe_to_construct(&self, entity: Entity) -> Result<(), ConstructionError> {
pub fn check_can_construct_entity(&self, entity: Entity) -> Result<(), ConstructionError> {
match self.get(entity) {
Ok(Some(_)) => Err(ConstructionError::AlreadyConstructed),
Ok(None) => Ok(()),