use loaders::{ProgressBar, Theme};
use std::thread;
use std::time::Duration;
fn main() {
let pb = ProgressBar::new(100);
pb.set_prefix("default");
pb.set_message("working");
for _ in 0..100 {
pb.inc(1);
thread::sleep(Duration::from_millis(25));
}
pb.finish_with_message("Done!");
let themed = ProgressBar::new(100);
themed.set_prefix("unicode");
themed.set_style(Theme::Unicode.style());
themed.set_message("working");
for _ in 0..100 {
themed.inc(1);
thread::sleep(Duration::from_millis(25));
}
themed.finish_with_message("Done!");
}