chore: deps rand
This commit is contained in:
parent
b945d0404f
commit
dc7c34d7e4
2 changed files with 3 additions and 3 deletions
|
|
@ -36,7 +36,7 @@ post-quantum = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
rand = "0.8.5"
|
rand = "0.9.0"
|
||||||
ahash = "0.8.11"
|
ahash = "0.8.11"
|
||||||
bytes = "1.9.0"
|
bytes = "1.9.0"
|
||||||
derive_builder = "0.20.2"
|
derive_builder = "0.20.2"
|
||||||
|
|
|
||||||
|
|
@ -80,8 +80,8 @@ impl LoadBalanceRandomBuilder {
|
||||||
impl LoadBalanceWithPointer for LoadBalanceRandom {
|
impl LoadBalanceWithPointer for LoadBalanceRandom {
|
||||||
/// Returns the random index within the range
|
/// Returns the random index within the range
|
||||||
fn get_ptr(&self, _info: Option<&LoadBalanceContext>) -> PointerToUpstream {
|
fn get_ptr(&self, _info: Option<&LoadBalanceContext>) -> PointerToUpstream {
|
||||||
let mut rng = rand::thread_rng();
|
let mut rng = rand::rng();
|
||||||
let ptr = rng.gen_range(0..self.num_upstreams);
|
let ptr = rng.random_range(0..self.num_upstreams);
|
||||||
PointerToUpstream { ptr, context: None }
|
PointerToUpstream { ptr, context: None }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue