Fix documentation of Entities::get (#17721)

This method returns `None` if `meta.location.archetype_id` is
`ArchetypeId::INVALID`.
`EntityLocation::INVALID.archetype_id` is `ArchetypeId::INVALID`.
Therefore this method cannot return `Some(EntityLocation::INVALID)`.
Linking to it in the docs is futile anyway as that constant is not
public.
This commit is contained in:
urben1680 2025-02-10 23:05:05 +01:00 committed by GitHub
parent 84359514bd
commit 7f9588d4c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -830,7 +830,7 @@ impl Entities {
}
/// Returns the location of an [`Entity`].
/// Note: for pending entities, returns `Some(EntityLocation::INVALID)`.
/// Note: for pending entities, returns `None`.
#[inline]
pub fn get(&self, entity: Entity) -> Option<EntityLocation> {
if let Some(meta) = self.meta.get(entity.index() as usize) {