# Hands-On Rust: Wrong multiplier for 8x8 console in main.rs

**URL:** <https://forum.devtalk.com/t/hands-on-rust-wrong-multiplier-for-8x8-console-in-main-rs/4460>\
**Category:** PragProg Customers\
**Tags:** book-hands-on-rust, errata\
**Created:** [27 November 2020 17:43 UTC](https://forum.devtalk.com/t/hands-on-rust-wrong-multiplier-for-8x8-console-in-main-rs/4460 "2020-11-27T17:43:24Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [29 November 2020 14:54 UTC](https://forum.devtalk.com/t/hands-on-rust-wrong-multiplier-for-8x8-console-in-main-rs/4460/5 "2020-11-29T14:54:26Z")

</div>

Not embarrassing - happens to all of us. I once replaced every news article on a production server with the word “quilting” because of an SQL typo…

I think you’re right about renaming the constants and making the multiply/scaling more obvious. I’ll see if I can clean that up for the next beta. Thanks!

That’s a good point about magic numbers. You could include

```rust
const MAP_LAYER : usize = 0;`
const DISPLAY_LAYER : usize = 1;`
const HUD_LAYER : usize = 2;

```

in your prelude, and use those. That would definitely be easier to read - I’ll see if putting that in won’t blow up my page count too badly (the eternal author struggle: fitting everything into a size the publisher wants to print!)

---

_[View the full topic](https://forum.devtalk.com/t/hands-on-rust-wrong-multiplier-for-8x8-console-in-main-rs/4460)._
