Skip to content

Commit

Permalink
fmt: fmt example
Browse files Browse the repository at this point in the history
  • Loading branch information
a8m committed Oct 14, 2016
1 parent a0285b0 commit 90692f9
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions examples/multi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,25 @@ fn main() {
pb.tick_format("▏▎▍▌▋▊▉██▉▊▋▌▍▎▏");
pb.show_message = true;
thread::spawn(move || {
for _ in 0..count/20 {
for _ in 0..count / 20 {
for _ in 0..20 {
pb.message("Waiting : ");
thread::sleep(Duration::from_millis(50));
pb.tick();
}
for _ in 0..20 {
pb.message("Waiting : ");
thread::sleep(Duration::from_millis(50));
pb.tick();
}
for _ in 0..20 {
let n = rand::thread_rng().gen_range(0, 100 * i);
pb.message("Connected: ");
thread::sleep(Duration::from_millis(n));
pb.inc();
}
pb.message("Connected: ");
thread::sleep(Duration::from_millis(n));
pb.inc();
}
}
for _ in 0..20 {
pb.message("Cleaning :");
thread::sleep(Duration::from_millis(100));
pb.tick();
}
for _ in 0..20 {
pb.message("Cleaning :");
thread::sleep(Duration::from_millis(100));
pb.tick();
}
pb.message("Completed! ");
pb.message("Completed! ");
pb.tick();
pb.finish();
});
Expand All @@ -52,7 +52,7 @@ fn main() {
for _ in 0..count {
pb.inc();
let n = rand::thread_rng().gen_range(0, 100 * i);
thread::sleep(Duration::from_millis(n));
thread::sleep(Duration::from_millis(n));
}
pb.finish();
});
Expand Down

0 comments on commit 90692f9

Please sign in to comment.