From 7c1b2f75273ea87cf2e2ffc49d5375556f5dc503 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Aug 2022 14:20:25 +0200 Subject: [PATCH] Bump indicatif from 0.16.2 to 0.17.0 (#711) * Bump indicatif from 0.16.2 to 0.17.0 Bumps [indicatif](https://github.com/console-rs/indicatif) from 0.16.2 to 0.17.0. - [Release notes](https://github.com/console-rs/indicatif/releases) - [Commits](https://github.com/console-rs/indicatif/compare/0.16.2...0.17.0) --- updated-dependencies: - dependency-name: indicatif dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Update progress bar setup Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Matthias --- Cargo.lock | 7 +++---- lychee-bin/Cargo.toml | 2 +- lychee-bin/src/commands/check.rs | 7 +++---- 3 files changed, 7 insertions(+), 9 deletions(-) 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) };