Hands-on Rust: Various Typos/Notes B4.0

hands-on-rust_B4.0.pdf

A few more notes. I tried to remove duplicates that others have already posted. Hopefully these are new.

p218
“Don’t forget to activate your module: open map_builder/mod.rs , and insert a line
that imports the module ( mod rooms; ).”
I reported previous examples like this where you have a “use” statement in the code archives but not in the text or code snippets.
use rooms::RoomsArchitect;
The code in the snippets do not compile without this.

p238
When apply_prefab to the build function, there is no mention of adding
mod prefab;
to mam_builder\mods.rs
As above , your archive code also include a use statement:
use prefab::apply_prefab;

p246
When apply_prefab to the build function, there is no mention of adding
mod themes;
to map_builder\mods.rs
or, as seen in in your archive code:
pub use themes::*;

p278 Instruction
We do not have a map variable declared so the code snippet does not compile. Code archive shows the map as a resource in the end_turn function parameters.

1 Like

Thanks! I’ve added this into the issue tracker, and will do my best to get them incorporated into beta 5. Keeping the archive code synced with the book code is difficult - so thank you for spotting the issues.

1 Like

I can’t imagine how you keep track of all that !

1 Like