Evaluating to Values
We'll cover the following...
I mentioned that an if
is an expression. And if you remember from Anatomy of Rust:
An expression is evaluated to a value of a specific type
So far, every if
expression we’ve had evaluates to unit. However, we can have it evaluate to ...