Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 53 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ eff-lexical-data = { path = "crates/eff-lexical-data", version = "1.0.0" }
# crates.io deps
anyhow = { version = "1.0.93", features = ["backtrace"] }
clap = { version = "4.5.21", default-features = false, features = ["std", "derive", "help", "usage", "error-context"] }
rand = "0.8.5"
rand = "0.9.0"
sha2 = "0.10.8"
test-case = "3.3.1"
thiserror = "2.0.3"
6 changes: 3 additions & 3 deletions crates/pgen/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use bip39_lexical_data::WL_BIP39;
use clap::{Parser, ValueEnum};
use eff_lexical_data::{WL_AUTOCOMPLETE, WL_LONG, WL_SHORT};
use rand::thread_rng;
use rand::rng;
use rand::Rng;
use std::io::{stdin, stdout, Write};
use thiserror::Error;
Expand Down Expand Up @@ -184,11 +184,11 @@ fn main() -> anyhow::Result<()> {
}
}
} else {
let mut rng = thread_rng();
let mut rng = rng();

for i in 0..num_words {
handle.write_all(
wordlist[rng.gen_range(0..wordlist.len()) as usize].as_bytes(),
wordlist[rng.random_range(0..wordlist.len()) as usize].as_bytes(),
)?;
if i < (num_words - 1) {
handle.write_all(b" ")?;
Expand Down
Loading