rust-by-example-ext
rust-by-example-ext copied to clipboard
Rand: update to work with latest rand version
The code from this article worked fine with rand
version listed in the Cargo.toml. However, in the 8.0.0
the gen_range
method has changed and it now gets one Range argument. I think it's better to update this article to work with latest version, especially when now developers can add dependencies via cargo add
and it is likely that they will use it without specifying a version. I've also removed the extern crate
because it is no longer needed since Rust 2018