Wrap
This commit is contained in:
parent
9095cf9905
commit
a2ee1420b8
1 changed files with 1 additions and 1 deletions
|
@ -792,7 +792,7 @@ impl WrappingRange {
|
|||
pub fn is_full_for(&self, size: Size) -> bool {
|
||||
let max_value = size.unsigned_int_max();
|
||||
debug_assert!(self.start <= max_value && self.end <= max_value);
|
||||
(self.start == 0 && self.end == max_value) || (self.end + 1 == self.start)
|
||||
(self.start == 0 && self.end == max_value) || (self.end.wrapping_add(1) == self.start)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue