Simplify zero check
This commit is contained in:
parent
32d7e5b723
commit
d92810646e
@ -710,7 +710,7 @@ impl WrappingRange {
|
|||||||
/// Equal to `range.contains(0)` but should be faster.
|
/// Equal to `range.contains(0)` but should be faster.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn contains_zero(&self) -> bool {
|
pub fn contains_zero(&self) -> bool {
|
||||||
!(self.start <= self.end && self.start != 0)
|
self.start > self.end || self.start == 0
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns new `WrappingRange` with replaced `start`
|
/// Returns new `WrappingRange` with replaced `start`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user