File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ http = "1.0"
1717log = " 0.4.6"
1818pin-project = " 1.0.10"
1919tokio = { version = " 1.17.0" , features = [" time" ] }
20- rand = " 0.8.5 "
20+ rand = " 0.10.1 "
2121base64 = " 0.22.1"
2222
2323launchdarkly-sdk-transport = { version = " 0.1.0" }
Original file line number Diff line number Diff line change 11use std:: time:: { Duration , Instant } ;
22
3- use rand:: { thread_rng , Rng } ;
3+ use rand:: RngExt ;
44
55pub ( crate ) trait RetryStrategy {
66 /// Return the next amount of time a failed request should delay before re-attempting.
@@ -59,7 +59,7 @@ impl RetryStrategy for BackoffRetry {
5959 self . next_delay = std:: cmp:: min ( self . max_delay , current_delay * self . backoff_factor ) ;
6060
6161 if self . include_jitter {
62- thread_rng ( ) . gen_range ( current_delay / 2 ..=current_delay)
62+ rand :: rng ( ) . random_range ( current_delay / 2 ..=current_delay)
6363 } else {
6464 current_delay
6565 }
You can’t perform that action at this time.
0 commit comments