Skip to content

Upgrade to version 0.9.0 of 'rand' crate. #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ debug = true
[dependencies]
fastly = "0.11.2"
hmac-sha256 = "1.1.7"
rand = "0.8.5"
rand = "0.9.0"
serde = { version = "1.0.203", features = ["derive"] }
serde_json = "1.0.120"
base64 = "0.22.1"
Expand Down
6 changes: 3 additions & 3 deletions src/pkce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ use base64::{
Engine as _,
};
use hmac_sha256::Hash;
use rand::distributions::Alphanumeric;
use rand::{thread_rng, Rng};
use rand::distr::Alphanumeric;
use rand::{rng, Rng};
use std::iter;
const CUSTOM_ENGINE: engine::GeneralPurpose =
engine::GeneralPurpose::new(&alphabet::URL_SAFE, general_purpose::NO_PAD);

pub fn rand_chars(length: usize) -> String {
let mut rng = thread_rng();
let mut rng = rng();
iter::repeat(())
.map(|()| rng.sample(Alphanumeric))
.map(char::from)
Expand Down
Loading