Skip to content

Commit d928106

Browse files
committed
Simplify zero check
1 parent 32d7e5b commit d928106

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_target/src/abi

1 file changed

+1
-1
lines changed

compiler/rustc_target/src/abi/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ impl WrappingRange {
710710
/// Equal to `range.contains(0)` but should be faster.
711711
#[inline]
712712
pub fn contains_zero(&self) -> bool {
713-
!(self.start <= self.end && self.start != 0)
713+
self.start > self.end || self.start == 0
714714
}
715715

716716
/// Returns new `WrappingRange` with replaced `start`

0 commit comments

Comments
 (0)