This commit is contained in:
2024-12-13 02:16:43 -08:00
parent 35637cece1
commit 1a6d37f4f3
5 changed files with 8 additions and 6 deletions

View File

@ -65,10 +65,7 @@ impl OrderingRules {
}
}
fn is_sorted(&self, a: u64, b: u64) -> bool {
match self.pairs.get(&(a, b)) {
Some(Ordering::Less) | Some(Ordering::Equal) => true,
_ => false,
}
matches!(self.pairs.get(&(a, b)), Some(Ordering::Less) | Some(Ordering::Equal))
}
}