beginner question: What is the advantage of using cmp::Ordering::Less over “<”, same for Greater and Equals?
You must log in or register to comment.
Basically,
cmp::Ordering::Less
is an enum so a match using it is guaranteed to be exhaustive, whereas you need to be careful when doing an if/else chain that you cover all cases.