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] <support@github.com>

* Update progress bar setup

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthias <matthias-endler@gmx.net>
This commit is contained in:
dependabot[bot] 2022-08-03 14:20:25 +02:00 committed by GitHub
parent 5a82854e16
commit 7c1b2f7527
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 9 deletions

7
Cargo.lock generated
View file

@ -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]]

View file

@ -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"

View file

@ -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)
};