I tried to replace a set of if a < b {} else ... with an Ordering and the result wasn't so nice.
Can be replaced with:
match a.cmp(&b) {
Ordering::Less => {},
Ordering::Equal => {},
_ => {},
}
match a.cmp(&b) {
Ordering::Less | Ordering::Equal => {},
_ => {},
}
But this would be nicer:
match a.cmp(&b) {
Ordering::LessEq => {},
_ => {},
I'm not sure how important this is though. a <= b reads so much nicer. I'm not sure where Ordering has a really strong usecase.