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:
parent
84359514bd
commit
7f9588d4c6
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user