Rust - Unresolved import `rand`
07 Sep 2022Rust
I encounter this error when I’m going to use rand::thread_rng().gen_range()
function to create a random number.
How to solve this ? It’s really simple!
- open
Cargo.toml
- add
rand = "*"
below[dependencies]