summaryrefslogtreecommitdiffstats
path: root/vendor/indicatif/examples/slow.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/indicatif/examples/slow.rs')
-rw-r--r--vendor/indicatif/examples/slow.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/vendor/indicatif/examples/slow.rs b/vendor/indicatif/examples/slow.rs
new file mode 100644
index 000000000..91a8e7e60
--- /dev/null
+++ b/vendor/indicatif/examples/slow.rs
@@ -0,0 +1,12 @@
+use indicatif::{ProgressBar, ProgressStyle};
+use std::time::Duration;
+
+fn main() {
+ let progress =
+ ProgressBar::new(10).with_style(ProgressStyle::default_bar().progress_chars("🔐🔑🕓"));
+ for _ in 0..10 {
+ progress.inc(1);
+ std::thread::sleep(Duration::from_secs(1));
+ }
+ progress.finish();
+}