diff options
Diffstat (limited to 'src/model.rs')
| -rw-r--r-- | src/model.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/model.rs b/src/model.rs index 12b0433..e7cbc6d 100644 --- a/src/model.rs +++ b/src/model.rs @@ -1,5 +1,5 @@ use chrono::{DateTime, Local, NaiveDateTime, TimeZone}; -use rand::{distributions::Alphanumeric, Rng}; +use rand::RngExt; #[derive(Debug, Clone, PartialEq, Eq)] pub struct File { @@ -23,8 +23,8 @@ pub fn local_time() -> DateTime<Local> { const FILE_ID_CHARS: usize = 28; pub fn generate_file_id() -> String { - rand::thread_rng() - .sample_iter(&Alphanumeric) + rand::rng() + .sample_iter(rand::distr::Alphanumeric) .take(FILE_ID_CHARS) .map(char::from) .collect() |
