diff --git a/lib/src/diff.rs b/lib/src/diff.rs index dc3dd13d9..704a3ab7b 100644 --- a/lib/src/diff.rs +++ b/lib/src/diff.rs @@ -297,13 +297,13 @@ struct BaseRange(Range); impl PartialOrd for BaseRange { fn partial_cmp(&self, other: &Self) -> Option { - self.0.start.partial_cmp(&other.0.start) + Some(self.cmp(other)) } } impl Ord for BaseRange { fn cmp(&self, other: &Self) -> Ordering { - self.0.start.cmp(&other.0.start) + self.0.start.cmp(&other.0.start).then_with(|| self.0.end.cmp(&other.0.end)) } }