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.

3 846 2

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

johnp
Running the examples in chapter 5 c under pytest 5.4.1 causes an AttributeError: ‘module’ object has no attribute ‘config’. In particula...
5 3547 1
New
yulkin
your book suggests to use Image.toByteData() to convert image to bytes, however I get the following error: "the getter ‘toByteData’ isn’t...
1 4071 2
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...
22 1619 20
New
herminiotorres
Hi @Margaret , On page VII the book tells us the example and snippets will be all using Elixir version 1.11 But on page 3 almost the en...
15 1543 13
New
brunogirin
When installing Cards as an editable package, I get the following error: ERROR: File “setup.py” not found. Directory cannot be installe...
0 1727 1
New
adamwoolhether
Is there any place where we can discuss the solutions to some of the exercises? I can figure most of them out, but am having trouble with...
17 1372 9
New
taguniversalmachine
Hi, I am getting an error I cannot figure out on my test. I have what I think is the exact code from the book, other than I changed “us...
0 1761 6
New
jwandekoken
Book: Programming Phoenix LiveView, page 142 (157/378), file lib/pento_web/live/product_live/form_component.ex, in the function below: d...
7 1151 10
New
dachristenson
I just bought this book to learn about Android development, and I’m already running into a major issue in Ch. 1, p. 20: “Update activity...
0 2059 6
New
dachristenson
@mfazio23 Android Studio will not accept anything I do when trying to use the Transformations class, as described on pp. 140-141. Googl...
0 2099 5
New

Other popular topics Top

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...
51 4319 20
New
New
AstonJ
Curious to know which languages and frameworks you’re all thinking about learning next :upside_down_face: Perhaps if there’s enough peop...
243 5922 95
New
New
PragmaticBookshelf
Rails 7 completely redefines what it means to produce fantastic user experiences and provides a way to achieve all the benefits of single...
32 3916 9
New
Help
I am trying to crate a game for the Nintendo switch, I wanted to use Java as I am comfortable with that programming language. Can you use...
8 3528 3
New
PragmaticBookshelf
Author Spotlight Mike Riley @mriley This month, we turn the spotlight on Mike Riley, author of Portable Python Projects. Mike’s book ...
62 6351 19
New
PragmaticBookshelf
Author Spotlight Rebecca Skinner @RebeccaSkinner Welcome to our latest author spotlight, where we sit down with Rebecca Skinner, auth...
106 10605 28
New
PragmaticBookshelf
Author Spotlight: Sophie DeBenedetto @SophieDeBenedetto The days of the traditional request-response web application are long gone, b...
37 3237 14
New
AstonJ
If you’re getting errors like this: psql: error: connection to server on socket “/tmp/.s.PGSQL.5432” failed: No such file or directory ...
1 2188 1
New

Sub Categories: