Skip to content

Commit

Permalink
Adding an is_destroy helper to EcsStepDestroy.
Browse files Browse the repository at this point in the history
  • Loading branch information
recatek committed Oct 12, 2024
1 parent 4094436 commit f9a039e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ pub enum EcsStepDestroy {
BreakDestroy,
}

impl EcsStepDestroy {
#[inline(always)]
pub fn is_destroy(&self) -> bool {
match self {
EcsStepDestroy::Continue => false,
EcsStepDestroy::Break => false,
EcsStepDestroy::ContinueDestroy => true,
EcsStepDestroy::BreakDestroy => true,
}
}
}

impl From<()> for EcsStep {
#[inline(always)]
fn from(_: ()) -> Self {
Expand Down

0 comments on commit f9a039e

Please sign in to comment.