Skip to content

Commit

Permalink
Bump rand dep
Browse files Browse the repository at this point in the history
  • Loading branch information
fosskers committed Dec 19, 2020
1 parent 41dbf0d commit 7af205d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ terminal_size = "0.1"

[dev-dependencies]
curl = "0.4"
rand = "0.7"
rand = "0.8"
rayon = "1.5"
version-sync = "0.9"
4 changes: 2 additions & 2 deletions examples/cancel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ fn main() {
let bar: Bar = p.lock().unwrap().bar(50, format!("Downloading #{}", n));

let mut rng = rand::thread_rng();
let wait = rng.gen_range(25, 250);
let wait = rng.gen_range(25..250);

for n in 0..=50 {
// Simulate our "download" failing.
let it_failed = rng.gen_range(0, 99) < 10;
let it_failed = rng.gen_range(0..=99) < 10;
if it_failed {
p.lock().unwrap().cancel(bar);
break;
Expand Down
2 changes: 1 addition & 1 deletion examples/multi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn main() {
.bar(BAR_MAX, format!("Downloading #{}", n));

// Determine how fast our thread progresses.
let wait = rand::thread_rng().gen_range(1, 10);
let wait = rand::thread_rng().gen_range(1..=10);

for n in 0..=BAR_MAX {
// Only draws the line of the specified `Bar` without wasting
Expand Down

0 comments on commit 7af205d

Please sign in to comment.