revert Range compare

This commit is contained in:
2025-12-11 12:33:56 +01:00
parent da69c60ffd
commit 3211a7705b

View File

@@ -55,7 +55,7 @@ pub fn touches(range: Range, other: Range) bool {
pub fn compare(lhs: Range, rhs: Range) std.math.Order {
assert(lhs.end >= lhs.start);
assert(rhs.end >= rhs.start);
return if (lhs.start >= rhs.end) .gt else if (lhs.end <= rhs.start) .lt else .eq;
return if (lhs.start > rhs.end) .gt else if (lhs.end < rhs.start) .lt else .eq;
}
pub fn getStart(range: Range, T: type) T {