Skip to content

Commit

Permalink
Upgrade to rand 0.9. (#1005)
Browse files Browse the repository at this point in the history
This PR upgrades rand to 0.9 which requires a few name changes.
  • Loading branch information
partim authored Feb 5, 2025
1 parent 3d8c05e commit 06636a5
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 16 deletions.
109 changes: 95 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ hyper-util = { version = "0.1", features = [ "server" ] }
listenfd = "1"
log = "0.4.8"
pin-project-lite = "0.2.4"
rand = "0.8.1"
rand = "0.9.0"
reqwest = { version = "0.12.4", default-features = false, features = ["blocking", "rustls-tls", "gzip" ] }
ring = "0.17"
rpki = { version = "0.18.5", features = [ "repository", "rrdp", "rtr", "serde", "slurm" ] }
Expand Down
2 changes: 1 addition & 1 deletion src/collector/rrdp/archive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ impl FallbackTime {
pub fn best_before(self) -> DateTime<Utc> {
// Saturating conversion between std’s and chrono’s Duration types.
Utc::now() + chrono::Duration::from_std(
rand::thread_rng().gen_range(self.min..self.max)
rand::rng().random_range(self.min..self.max)
).unwrap_or_else(|_| {
chrono::Duration::try_milliseconds(i64::MAX).unwrap()
})
Expand Down

0 comments on commit 06636a5

Please sign in to comment.