Hands-on Rust: possible typo (page 59)

In 4th comment to the code snippet it says that colour values should be specified in “0-254 range”. Should it be 255, seeing how it’s a u8?

Hi! Thanks for finding that - you’re right, that does look like a typo. With the book released, I can’t readily make changes. I’ve added it to my issue tracker, so if there’s a 2nd edition at some point in the future-it’ll be fixed in there.

1 Like