rustwasm / book

The Rust and WebAssembly Book
https://rustwasm.github.io/docs/book/
MIT License
1.73k stars 208 forks source link

The code of the third exercise answer of Implementing Game of Life is broken #135

Closed SomeoneToIgnore closed 5 years ago

SomeoneToIgnore commented 5 years ago

Describe the bug Last task of the section proposes to use fixedbitset crate, giving incomplete instructions on how to implement a task: the updated code for the constructor is missing. Even though it's simple to implement, it might be useful to add it into the answer also.

But even if the constructor code is updated, the code provided in the answer does not compile with the latest fixedbitset crate version because:

To Reproduce Steps to reproduce the behavior:

  1. Go to https://rustwasm.github.io/book/game-of-life/implementing.html#exercises
  2. Open the third exercise answer
  3. Apply it to the project (use fixedbitset = "0.1.9")
  4. Compile the project
  5. See compilation error

Expected behavior There are no compilation errors

Additional context