| 1 |
use std::thread; |
| 2 |
use std::time::Duration; |
| 3 |
|
| 4 |
use indicatif::ProgressBar; |
| 5 |
|
| 6 |
fn main() { |
| 7 |
let pb = ProgressBar::new(100); |
| 8 |
for i in 0..100 { |
| 9 |
thread::sleep(Duration::from_millis(25)); |
| 10 |
pb.println(format!("[+] finished #{i}")); |
| 11 |
pb.inc(1); |
| 12 |
} |
| 13 |
pb.finish_with_message("done"); |
| 14 |
} |