diff options
Diffstat (limited to 'src/sim/cell')
| -rw-r--r-- | src/sim/cell/cell.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sim/cell/cell.rs b/src/sim/cell/cell.rs index 6c6e704..be2cfad 100644 --- a/src/sim/cell/cell.rs +++ b/src/sim/cell/cell.rs @@ -22,11 +22,11 @@ impl Cell { } #[inline] pub fn match_parity(&mut self, seqno: u64) { - let parity = seqno % 2 != 0; + let parity = !seqno.is_multiple_of(2); if parity { self.flags |= Self::FLAG_PARITY; } else { - self.flags = self.flags & !Self::FLAG_PARITY + self.flags &= !Self::FLAG_PARITY } } @@ -39,7 +39,7 @@ impl Cell { if rb { self.flags |= Self::FLAG_ENTITY } else { - self.flags = self.flags & !Self::FLAG_ENTITY + self.flags &= !Self::FLAG_ENTITY } } |
