# Hands-on Rust: Missing code change to render the map with camera (page 113 in P1.0)

**URL:** <https://forum.devtalk.com/t/hands-on-rust-missing-code-change-to-render-the-map-with-camera-page-113-in-p1-0/13313>\
**Category:** PragProg Customers\
**Tags:** book-hands-on-rust, errata\
**Created:** [15 July 2021 13:20 UTC](https://forum.devtalk.com/t/hands-on-rust-missing-code-change-to-render-the-map-with-camera-page-113-in-p1-0/13313 "2021-07-15T13:20:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![eric](https://forum.devtalk.com/user_avatar/forum.devtalk.com/eric/32/3095_2.png) [@eric](https://forum.devtalk.com/u/eric)\
**Post date:** [15 July 2021 13:20 UTC](https://forum.devtalk.com/t/hands-on-rust-missing-code-change-to-render-the-map-with-camera-page-113-in-p1-0/13313/1 "2021-07-15T13:20:03Z")

</div>

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 the flow of the text.

Perhaps the next can just add the change on p113, from:

```
self.map.render(ctx);

```

To:

```
self.map.render(ctx, &self.camera);

```

In the state’s `impl` of the `GameState` trait.

---

<div class="post-metadata">

**Author:** ![herbert](https://forum.devtalk.com/user_avatar/forum.devtalk.com/herbert/32/1233_2.png) [@herbert](https://forum.devtalk.com/u/herbert)\
**Post date:** [15 July 2021 19:26 UTC](https://forum.devtalk.com/t/hands-on-rust-missing-code-change-to-render-the-map-with-camera-page-113-in-p1-0/13313/2 "2021-07-15T19:26:45Z")

</div>

Thanks! Now that it’s in-print, I can’t readily make changes - so I’ve noted this down. If there’s a 2nd edition in the future, it’ll be included then.

---

<div class="post-metadata">

**Author:** ![eric](https://forum.devtalk.com/user_avatar/forum.devtalk.com/eric/32/3095_2.png) [@eric](https://forum.devtalk.com/u/eric)\
**Post date:** [15 July 2021 23:08 UTC](https://forum.devtalk.com/t/hands-on-rust-missing-code-change-to-render-the-map-with-camera-page-113-in-p1-0/13313/3 "2021-07-15T23:08:30Z")

</div>

Thank you, Herbert. Very enjoyable book, and saw my comments are too late in the pipeline.

Just noticed the problem reported here is addressed page 114 (P1.0 of the PDF version), also addressing similar issue with the `player` struct. IN:

```auto
fn tick(&mut self, ctx: &mut BTerm) { ctx.set_active_console(0);
  ctx.cls();
  ctx.set_active_console(1);
  ctx.cls();
  self.player.update(ctx, &self.map, &mut self.camera);
  self.map.render(ctx, &self.camera);
  self.player.render(ctx, &self.camera);
}

```

So the problem would only happen with readers who code and run piece by piece (but you do propose to run the program after each piece; this may be the main reason to report). So keeping on reading is just fine on P1.0!

Thank you again for this very enjoyable book.
