mirror of
https://github.com/chatmail/core.git
synced 2026-04-21 15:36:30 +03:00
build: update rand to 0.9
We already have both rand 0.8 and rand 0.9 in our dependency tree. We still need rand 0.8 because public APIs of rPGP 0.17.0 and Iroh 0.35.0 use rand 0.8 types in public APIs, so it is imported as rand_old.
This commit is contained in:
@@ -32,7 +32,7 @@ use mailparse::MailHeaderMap;
|
||||
use mailparse::dateparse;
|
||||
use mailparse::headers::Headers;
|
||||
use num_traits::PrimInt;
|
||||
use rand::{Rng, thread_rng};
|
||||
use rand::Rng;
|
||||
use tokio::{fs, io};
|
||||
use url::Url;
|
||||
use uuid::Uuid;
|
||||
@@ -291,7 +291,7 @@ async fn maybe_warn_on_outdated(context: &Context, now: i64, approx_compile_time
|
||||
/// and divides both by 8 (byte size) and 6 (number of bits in a single Base64 character).
|
||||
pub(crate) fn create_id() -> String {
|
||||
// ThreadRng implements CryptoRng trait and is supposed to be cryptographically secure.
|
||||
let mut rng = thread_rng();
|
||||
let mut rng = rand::rng();
|
||||
|
||||
// Generate 144 random bits.
|
||||
let mut arr = [0u8; 18];
|
||||
|
||||
Reference in New Issue
Block a user