Conditional operation and boolean values in Rust
- Conditional: if
- Conditional: if - else
- Conditional: else - if
- Avoid the comparison chain using match
- Rust: boolean values true and false
- Assign result of conditional to variable
- Rust: other types don't have true/false values
- Toggle
- if-else returns a value
- Conditional (Ternary) operator
- match
- match all the numbers of an integer type
- match all the numbers of a float type
- match with conditions
- Exercise: one-dimensional space-fight.
- Solution: one-dimensional space-fight.