14
cmp::Ordering vs comparison symbols
(programming.dev)
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Credits
Here's a good example.
Basically,
cmp::Ordering::Lessis 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.