Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/bounded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl<T> Bounded<T> {
} else {
// One lap forward, index wraps around to zero.
// Set to `{ lap: lap.wrapping_add(1), mark: 0, index: 0 }`.
lap.wrapping_add(self.one_lap)
lap.wrapping_add(self.one_lap) & !(self.one_lap - 1)
};

// Try moving the tail.
Expand Down Expand Up @@ -169,7 +169,7 @@ impl<T> Bounded<T> {
} else {
// One lap forward, index wraps around to zero.
// Set to `{ lap: lap.wrapping_add(1), mark: 0, index: 0 }`.
lap.wrapping_add(self.one_lap)
lap.wrapping_add(self.one_lap) & !(self.one_lap - 1)
};

// Try moving the head.
Expand Down