Skip to content

Commit

Permalink
build(deps): upgrade rand to v0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
paolobarbolini committed Jan 27, 2025
1 parent b2f00c2 commit b50bd43
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 14 deletions.
103 changes: 92 additions & 11 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 watermelon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ bytes = "1"
serde = { version = "1.0.113", features = ["derive"] }
serde_json = "1"
pin-project-lite = "0.2"
rand = "0.8"
rand = { version = "0.9", default-features = false, features = ["thread_rng"] }
chrono = { version = "0.4.20", default-features = false, features = ["std", "clock", "serde"] }

# from-env
Expand Down
3 changes: 1 addition & 2 deletions watermelon/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use std::{

use arc_swap::ArcSwap;
use bytes::Bytes;
use rand::RngCore;
use tokio::{
sync::{
mpsc::{self, error::TrySendError, Permit},
Expand Down Expand Up @@ -497,7 +496,7 @@ impl TryCommandError {

pub(crate) fn create_inbox_subject(prefix: &Subject) -> Subject {
let mut suffix = [0u8; 16];
rand::thread_rng().fill_bytes(&mut suffix);
rand::fill(&mut suffix);

let mut subject = String::with_capacity(prefix.len() + ".".len() + (suffix.len() * 2));
write!(&mut subject, "{}.{:x}", prefix, u128::from_ne_bytes(suffix)).unwrap();
Expand Down

0 comments on commit b50bd43

Please sign in to comment.