Skip to content

Commit 88bbfd9

Browse files
dependabot[bot]sd-collins
authored andcommitted
Build(deps): bump rand from 0.8.5 to 0.9.0
Bumps [rand](https://github.com/rust-random/rand) from 0.8.5 to 0.9.0. - [Release notes](https://github.com/rust-random/rand/releases) - [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md) - [Commits](rust-random/rand@0.8.5...0.9.0) --- updated-dependencies: - dependency-name: rand dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
1 parent 16f66ee commit 88bbfd9

File tree

6 files changed

+111
-29
lines changed

6 files changed

+111
-29
lines changed

Cargo.lock

Lines changed: 104 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jsonwebtoken = "9.3"
2424
log = { version = "0.4.22", features = ["std", "serde"] }
2525
once_cell = "1.20"
2626
parking_lot = "0.12.3"
27+
rand = { version = "0.9.0" }
2728
reqwest = { version = "0.12.9", default-features = false, features = ["json"] }
2829
serde = { version = "1.0", features = ["derive"] }
2930
serde_json = "1.0"

lib/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ hyper.workspace = true
2323
jsonwebtoken.workspace = true
2424
log.workspace = true
2525
parking_lot.workspace = true
26-
rand = "0.8.5"
26+
rand.workspace = true
2727
reqwest.workspace = true
2828
serde.workspace = true
2929
serde_json.workspace = true

lib/src/mcu/auth/oauth2.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use async_trait::async_trait;
77
use chrono::{DateTime, Utc};
88
use jsonwebtoken::Header;
99
use log::debug;
10-
use rand::Rng;
10+
use rand::{Rng, TryRngCore};
1111
use serde::ser::SerializeStruct;
1212
use tokio::sync::Mutex;
1313

@@ -90,8 +90,8 @@ impl<'callback> OAuth2<'callback> {
9090
}
9191

9292
fn generate_token_id() -> String {
93-
let mut rng = rand::rngs::OsRng;
94-
let bytes: [u8; 18] = rng.gen();
93+
let mut rng = rand::rngs::OsRng.unwrap_err();
94+
let bytes: [u8; 18] = rng.random();
9595
hex::encode(bytes)
9696
}
9797

test_helpers/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ log.workspace = true
1717
once_cell.workspace = true
1818
parking_lot.workspace = true
1919
p256 = "0.13.2"
20-
rand = "0.8.5"
20+
rand.workspace = true
2121
serde.workspace = true
2222
serde_json.workspace = true
2323
serde_with.workspace = true

test_helpers/src/fs/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ use std::path::PathBuf;
22

33
use chrono::{serde::ts_seconds_option, DateTime, Utc};
44
use googletest::prelude::*;
5+
use p256::elliptic_curve::rand_core::OsRng;
56
use p256::pkcs8::*;
67
use p256::{ecdsa, pkcs8::LineEnding};
7-
use rand::rngs::OsRng;
88
use serde::Serialize;
99
use toml::{self, Value};
1010

0 commit comments

Comments
 (0)