mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-12-12 11:14:55 +02:00
5812f1f27b
The reasoning here is pretty straightforward: you don't say "Hungry, if eat." That doesn't make sense. We want to get "foo" back if given "fizz", so it seems this makes far more sense as "Eat, if hungry," or in this case, return `foo_if_fizz` is given. |
||
---|---|---|
.. | ||
if1.rs | ||
if2.rs | ||
README.md |
If
if
, the most basic (but still surprisingly versatile!) type of control flow, is what you'll learn here.