commit 4c9ab5da55bcd19a22caa46be4b8588b8d973d88
parent 76e36d7dd615358b3c8b18d430c35a515b49fdc2
Author: Yuval Langer <yuvallangerontheroad@gmail.com>
Date: Sat, 3 Sep 2022 19:02:51 +0300
Upgrade to latest rand package. Bump version number.
Diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "diceware"
-version = "0.3.1"
+version = "0.3.2"
authors = ["Yuval Langer <yuvallangerontheroad@gmail.com>"]
license = "AGPL-3.0"
repository = "https://gitlab.com/yuvallanger/rusty-diceware"
@@ -11,5 +11,5 @@ edition = "2018"
[dependencies]
-rand = "^0.6"
getopts = "^0.2"
+rand = "^0.8"
diff --git a/src/bin/diceware.rs b/src/bin/diceware.rs
@@ -4,7 +4,7 @@ extern crate rand;
//use std::env;
use getopts::Options;
-use rand::rngs::OsRng;
+use rand::thread_rng;
use rand::Rng;
use std::process::exit;
@@ -60,7 +60,7 @@ fn main() {
.opt_str("d")
.map_or(' ', |n_str| n_str.parse::<char>().ok().unwrap());
- let mut rng = OsRng::new().unwrap();
+ let mut rng = thread_rng();
if word_num != 0 {
if matches.opt_present("reinhold") {