Conditional Expression
Internally if/else desugars to a match expression. See syntax sugar for more information.
The if expression provides a simple control flow mechanism to
choose between two branches. Its use is straightforward:
A conditional expression can form the else clause of a previous
conditional expression:
Single-line If Expressions
Keyword then is often required in single-line if-expressions: