So I'm trying to learn Rust via the book/documentation, and there's a section where you must create a guessing game. I try to use the rand crate (I guess this is what you call it), however, the compiler says the name is unresolved, so I'm guessing maybe it either has a new name or something now. Regardless, even in the book's own online compiler it throws an error and will not run. You can find it here https://doc.rust-lang.org/book/guessing-game.html, can someone tell how I should write this code now?
The error is thrown on this line:
let secret_number = rand::thread_rng().gen_range(1, 101);
^^^^^^^^^^^^^^^