mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-26 10:45:57 +08:00
feat(native): bump deps (#9966)
This commit is contained in:
@@ -2,8 +2,8 @@ use std::convert::TryFrom;
|
||||
|
||||
use chrono::{DateTime, Duration, NaiveDateTime, Utc};
|
||||
use rand::{
|
||||
distributions::{Alphanumeric, Distribution},
|
||||
thread_rng,
|
||||
distr::{Alphanumeric, Distribution},
|
||||
rng,
|
||||
};
|
||||
use sha3::{Digest, Sha3_256};
|
||||
|
||||
@@ -66,7 +66,7 @@ impl Stamp {
|
||||
let bits = bits.unwrap_or(20);
|
||||
let rand = String::from_iter(
|
||||
Alphanumeric
|
||||
.sample_iter(thread_rng())
|
||||
.sample_iter(rng())
|
||||
.take(SALT_LENGTH)
|
||||
.map(char::from),
|
||||
);
|
||||
@@ -129,7 +129,7 @@ impl TryFrom<&str> for Stamp {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use rand::{distributions::Alphanumeric, Rng};
|
||||
use rand::{distr::Alphanumeric, Rng};
|
||||
use rayon::prelude::*;
|
||||
|
||||
use super::Stamp;
|
||||
@@ -188,7 +188,7 @@ mod tests {
|
||||
fn test_fuzz() {
|
||||
(0..1000).into_par_iter().for_each(|_| {
|
||||
let bit = rand::random::<u32>() % 20 + 1;
|
||||
let resource = rand::thread_rng()
|
||||
let resource = rand::rng()
|
||||
.sample_iter(&Alphanumeric)
|
||||
.take(7)
|
||||
.map(char::from)
|
||||
|
||||
Reference in New Issue
Block a user