rust-by-example-ext icon indicating copy to clipboard operation
rust-by-example-ext copied to clipboard

Rand: update to work with latest rand version

Open skhyr opened this issue 1 year ago • 0 comments

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

skhyr avatar Feb 08 '23 21:02 skhyr