maint: handling uniform distribution error

This commit is contained in:
James Hodgkinson 2025-04-22 15:09:35 +10:00
parent 0312da9a51
commit 99881e8a16
No known key found for this signature in database

View file

@ -80,7 +80,8 @@ impl Distribution<char> for DistinctAlpha {
const GEN_ASCII_STR_CHARSET: &[u8] = b"ABCDEFGHJKLMNPQRSTUVWXYZ\
abcdefghjkpqrstuvwxyz\
0123456789";
// TODO: this needs to handle the error, maybe?
#[allow(clippy::expect_used)]
let range = Uniform::new(0, RANGE).expect("Failed to get a uniform range");
let n = range.sample(rng);