/books/hands-on-rust
Active Threads:
Most Active This Week
Most Active This Month

On page 206 (Talking about P1.0) the trait MapArchitect is defined with the function ‘new’. In the last paragraph of this page the functi...
New

In the part “Fill the Map With Walls” on page 90 it is stated that the iterator passes variable t inside the closure as reference, but it...
New
Most Active This Year

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

Title: Hands-On Rust (Chap 8 (Adding a Heads Up Display)
It looks like
.with_simple_console_no_bg(SCREEN_WIDTH*2, SCREEN_HEIGHT*2...
New

After finishing the code at the end of Chapter 7 and running it, monsters sometimes don’t get destroyed on collision. Instead, the player...
New

in the example, the
self.player.update(ctx, &self.map)
line is new for this code block, so another arrow is needed in the left of t...
New

I noticed on page 178, the last paragraph, still refers to the build function, instead of new.
“Navigate to the end of the build functio...
New

If you copy/paste the second TOML snipped with features, there are two issues:
It’s presented as multi-line, but TOML doesn’t support m...
New

Book version 1.0
The filename should be systems/mod.rs
New

My silly brain caught a very small typo. I’m guessing that the “is” in this sentence was meant to instead be “in”:
This library uses th...
New

In the fn restart code block, the “added line” arrow(➤) is on the self.mode line, and not the self.score line.
New

I had to use DrawBatch to get the game over screen to display:
fn game_over(&mut self, ctx: &mut BTerm) {
let mut draw_batch = ...
New

In note (2) on page 229 there is a “xxx” placeholder instead of reference to the corresponding chapter.
New

the pub fn new() line is aligned with the impl Map { line, and should be indented another four spaces.
New
Most Active Last Three Years

I get a significant glitch on my raspberry pi - there is a thin line to the left of the player that runs from the top of the screen to th...
New

Please use the following format for the title of this thread (then simply delete/replace this text with the content for the thread):
Tit...
New

MapBuilder doesn’t have new method.
MapBuilder::new -> MapBuilder::build
New

In the end of chapter 7 we write the movement function in movement.rs
We call the camera on_player_move method like so:
camera.on_play...
New

The call to map_idx on the render function of map (let idx = map_idx(x, y) ; ) caused error ‘error[E0425]: cannot find function map_idx i...
New

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
“...
New

The description for a while loop is inverted. It currently reads “run the enclosed code until x evaluates to true” it should either be “w...
New

The very top of pg. 83 is a seemingly stray:
impl Map {
It’s preceded and followed by map implementation pieces, so perhaps it’s just a...
New

Looks like Legion 0.3.0 is not compiling with Rust 1.49.0.
Legion 0.3.1 appears OK so far.
New

➾ cargo run
❮ Hello, what’s your name?
➾ Bert
❮ Welcome to the Treehouse, Bert
Bert should be lowercase on the output (after Treehous...
New

Hi, on page 25 in the Trimming Input section, after this text:
“You can see this by replacing your last println! call with the following...
New

When introducing the camera, compilation errs as the change to the map’s render method is not reflected in src/main.rs, if just following...
New

Hands-on Rust: Chapter 5 “Storing the Dungeon Map: no instructions to modify main() before first run
There are no instructions to modify main() prior to the first attempt to run the sample code. As a result, run just prints out the defau...
New

Typo Set() instead of set() when explaining the bracket-lib function on page 57.
New

The instruction:
Add the following code to your main function, immediately after the println!:
Makes your_name be used before the decla...
New
Book Info
Publisher:
Pragmatic Bookshelf
Are you this book's author? To be notified of all posts made about it, sign up an account then click here, then select 'watching' from the bell icon in the top right corner.
Get money off!

The Pragmatic Bookshelf
35% off any eBook
Simply use coupon code "devtalk.com" at checkout. See full details here.