ksorensen

ksorensen

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.

Marked As Solved

herbert

herbert

Author of Hands-on Rust

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.

Also Liked

ksorensen

ksorensen

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

Where Next?

Popular Pragmatic Bookshelf topics Top

belgoros
Following the steps described in Chapter 6 of the book, I’m stuck with running the migration as described on page 84: bundle exec sequel...
New
mikecargal
Title: Hands-On Rust (Chapter 11: prefab) Just played a couple of amulet-less games. With a bit of debugging, I believe that your can_p...
New
raul
Page 28: It implements io.ReaderAt on the store type. Sorry if it’s a dumb question but was the io.ReaderAt supposed to be io.ReadAt? ...
New
AleksandrKudashkin
On the page xv there is an instruction to run bin/setup from the main folder. I downloaded the source code today (12/03/21) and can’t see...
New
joepstender
The generated iex result below should list products instead of product for the metadata. (page 67) iex> product = %Product{} %Pento....
New
cro
I am working on the “Your Turn” for chapter one and building out the restart button talked about on page 27. It recommends looking into ...
New
New
tkhobbes
After some hassle, I was able to finally run bin/setup, now I have started the rails server but I get this error message right when I vis...
New
a.zampa
@mfazio23 I’m following the indications of the book and arriver ad chapter 10, but the app cannot be compiled due to an error in the Bas...
New
SlowburnAZ
Getting an error when installing the dependencies at the start of this chapter: could not compile dependency :exla, "mix compile" failed...
New

Other popular topics Top

Devtalk
Hello Devtalk World! Please let us know a little about who you are and where you’re from :nerd_face:
New
AstonJ
If it’s a mechanical keyboard, which switches do you have? Would you recommend it? Why? What will your next keyboard be? Pics always w...
New
ohm
Which, if any, games do you play? On what platform? I just bought (and completed) Minecraft Dungeons for my Nintendo Switch. Other than ...
New
siddhant3030
I’m thinking of buying a monitor that I can rotate to use as a vertical monitor? Also, I want to know if someone is using it for program...
New
brentjanderson
Bought the Moonlander mechanical keyboard. Cherry Brown MX switches. Arms and wrists have been hurting enough that it’s time I did someth...
New
AstonJ
Inspired by this post from @Carter, which languages, frameworks or other tech or tools do you think is killing it right now? :upside_down...
New
AstonJ
Biggest jackpot ever apparently! :upside_down_face: I don’t (usually) gamble/play the lottery, but working on a program to predict the...
New
husaindevelop
Inside our android webview app, we are trying to paste the copied content from another app eg (notes) using navigator.clipboard.readtext ...
New
AnfaengerAlex
Hello, I’m a beginner in Android development and I’m facing an issue with my project setup. In my build.gradle.kts file, I have the foll...
New
AstonJ
This is a very quick guide, you just need to: Download LM Studio: https://lmstudio.ai/ Click on search Type DeepSeek, then select the o...
New

Sub Categories: