Skip to content

Commit

Permalink
update deps (rand 0.8)
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasf committed Dec 22, 2020
1 parent 1055a8d commit 9cebeaf
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 24 deletions.
95 changes: 73 additions & 22 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 @@ -18,7 +18,7 @@ bitflags = "1.2"
configparser = "1.0"
xz = "0.1"
num_cpus = "1.13"
rand = "0.7"
rand = "0.8"
reqwest = { version = "0.10", features = ["json", "rustls-tls"], default-features = false }
rustls = "0.18" # will fail at runtime if mismatch with reqwest
self_update = { version = "0.22", features = ["rustls"], default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ impl RandomizedBackoff {
let cap = max(low, self.max_backoff.as_millis() as u64);
let last = self.duration.as_millis() as u64;
let high = 4 * max(low, last);
let t = min(cap, rand::thread_rng().gen_range(low, high));
let t = min(cap, rand::thread_rng().gen_range(low..high));
self.duration = Duration::from_millis(t);
self.duration
}
Expand Down

0 comments on commit 9cebeaf

Please sign in to comment.