diff --git a/Cargo.lock b/Cargo.lock index 453140d..f787732 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1560,14 +1560,13 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.16.2" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d207dc617c7a380ab07ff572a6e52fa202a2a8f355860ac9c38e23f8196be1b" +checksum = "fcc42b206e70d86ec03285b123e65a5458c92027d1fb2ae3555878b8113b3ddf" dependencies = [ "console", - "lazy_static", "number_prefix", - "regex", + "unicode-width", ] [[package]] diff --git a/lychee-bin/Cargo.toml b/lychee-bin/Cargo.toml index 6dc858e..4577d6b 100644 --- a/lychee-bin/Cargo.toml +++ b/lychee-bin/Cargo.toml @@ -23,7 +23,7 @@ console = "0.15.1" const_format = "0.2.26" headers = "0.3.7" http = "0.2.8" -indicatif = "0.16.2" +indicatif = "0.17.0" openssl-sys = "0.9.75" pad = "0.1.6" regex = "1.6.0" diff --git a/lychee-bin/src/commands/check.rs b/lychee-bin/src/commands/check.rs index 3e10887..18a2bca 100644 --- a/lychee-bin/src/commands/check.rs +++ b/lychee-bin/src/commands/check.rs @@ -1,5 +1,6 @@ use std::io::{self, Write}; use std::sync::Arc; +use std::time::Duration; use indicatif::ProgressBar; use indicatif::ProgressStyle; @@ -52,13 +53,11 @@ where } else { let bar = ProgressBar::new_spinner().with_style(ProgressStyle::default_bar().template( "{spinner:.red.bright} {pos}/{len:.dim} [{elapsed_precise}] {bar:25} {wide_msg}", - )); + ).expect("Valid progress bar")); bar.set_length(0); bar.set_message("Extracting links"); - // 10 updates per second = report status at _most_ every 100ms - bar.set_draw_rate(10); // report status _at least_ every 500ms - bar.enable_steady_tick(500); + bar.enable_steady_tick(Duration::from_millis(500)); Some(bar) };