Skip to content

Commit 253f5f4

Browse files
committed
Upgrade to version 0.9.0 of 'rand' crate.
1 parent 1dee006 commit 253f5f4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ debug = true
1010
[dependencies]
1111
fastly = "0.11.2"
1212
hmac-sha256 = "1.1.7"
13-
rand = "0.8.5"
13+
rand = "0.9.0"
1414
serde = { version = "1.0.203", features = ["derive"] }
1515
serde_json = "1.0.120"
1616
base64 = "0.22.1"

src/pkce.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ use base64::{
44
Engine as _,
55
};
66
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};
99
use std::iter;
1010
const CUSTOM_ENGINE: engine::GeneralPurpose =
1111
engine::GeneralPurpose::new(&alphabet::URL_SAFE, general_purpose::NO_PAD);
1212

1313
pub fn rand_chars(length: usize) -> String {
14-
let mut rng = thread_rng();
14+
let mut rng = rng();
1515
iter::repeat(())
1616
.map(|()| rng.sample(Alphanumeric))
1717
.map(char::from)

0 commit comments

Comments
 (0)