File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ debug = true
10
10
[dependencies ]
11
11
fastly = " 0.11.2"
12
12
hmac-sha256 = " 1.1.7"
13
- rand = " 0.8.5 "
13
+ rand = " 0.9.0 "
14
14
serde = { version = " 1.0.203" , features = [" derive" ] }
15
15
serde_json = " 1.0.120"
16
16
base64 = " 0.22.1"
Original file line number Diff line number Diff line change @@ -4,14 +4,14 @@ use base64::{
4
4
Engine as _,
5
5
} ;
6
6
use hmac_sha256:: Hash ;
7
- use rand:: distributions :: Alphanumeric ;
8
- use rand:: { thread_rng , Rng } ;
7
+ use rand:: distr :: Alphanumeric ;
8
+ use rand:: { rng , Rng } ;
9
9
use std:: iter;
10
10
const CUSTOM_ENGINE : engine:: GeneralPurpose =
11
11
engine:: GeneralPurpose :: new ( & alphabet:: URL_SAFE , general_purpose:: NO_PAD ) ;
12
12
13
13
pub fn rand_chars ( length : usize ) -> String {
14
- let mut rng = thread_rng ( ) ;
14
+ let mut rng = rng ( ) ;
15
15
iter:: repeat ( ( ) )
16
16
. map ( |( ) | rng. sample ( Alphanumeric ) )
17
17
. map ( char:: from)
You can’t perform that action at this time.
0 commit comments