Simplify zero check
This commit is contained in:
parent
32d7e5b723
commit
d92810646e
1 changed files with 1 additions and 1 deletions
|
@ -710,7 +710,7 @@ impl WrappingRange {
|
|||
/// Equal to `range.contains(0)` but should be faster.
|
||||
#[inline]
|
||||
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`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue