diff options
| author | Joris Guyonvarch | 2026-03-21 22:02:10 +0100 |
|---|---|---|
| committer | Joris Guyonvarch | 2026-03-21 22:02:10 +0100 |
| commit | 44cf1913ea1433b99154fb46f5761ac8b280908b (patch) | |
| tree | 5dd19b4b812c7419bcb040286bcf400024768f9a /src/model.rs | |
| parent | cf406c5c9c38a24549c9fdd7e807632aef051766 (diff) | |
Upgrade dependencies
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() |
