mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-12-26 00:00:03 +03: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. |
||
---|---|---|
.. | ||
advanced_errors | ||
clippy | ||
collections | ||
conversions | ||
enums | ||
error_handling | ||
functions | ||
generics | ||
if | ||
intro | ||
macros | ||
modules | ||
move_semantics | ||
option | ||
primitive_types | ||
standard_library_types | ||
strings | ||
structs | ||
tests | ||
threads | ||
traits | ||
variables | ||
quiz1.rs | ||
quiz2.rs | ||
quiz3.rs | ||
quiz4.rs | ||
README.md |
Exercise to Book Chapter mapping
Exercise | Book Chapter |
---|---|
variables | §3.1 |
functions | §3.3 |
if | §3.5 |
move_semantics | §4.1, §4.2 |
primitive_types | §3.2, §4.3 |
structs | §5.1, §5.3 |
enums | §6, §18.3 |
modules | §7 |
collections | §8.1, §8.3 |
strings | §8.2 |
error_handling | §9 |
generics | §10 |
option | §10.1 |
traits | §10.2 |
tests | §11.1 |
standard_library_types | §13.2, §15.1, §16.3 |
threads | §16.1 |
macros | §19.6 |
clippy | n/a |
conversions | n/a |