rj00a / evenio

An event-driven Entity Component System
MIT License
132 stars 14 forks source link

Add `Fetcher::get_unchecked` #54

Closed rj00a closed 4 months ago

rj00a commented 4 months ago
#[inline]
pub unsafe fn get_unchecked(&self, entity: EntityId) -> Result<Q::Item<'_>, GetError> {
    self.state.get_unchecked(self.world.entities(), entity)
}

Useful when you know entity IDs are disjoint but can't prove it to the compiler.