Intro
This part summarizes the sixth chapter of "Programming Rust, 2nd Edition", "Expressions".
An Expression Language
All control structures are expressions – they can produce a value. For example:
let status =
if cpu.temperature <= MAX_TEMP {
HttpStatus::Ok
} else {
HttpStatus::ServerError // server melted
};
Blocks and Semicolons
A block can produce a value …