From 15d8024c7c336909560fb87b528ae1cd0d4f6ad8 Mon Sep 17 00:00:00 2001 From: Matthias Endler Date: Thu, 22 Dec 2022 15:29:45 +0100 Subject: [PATCH] Change progress bar style (#718) * 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 * Change progress bar style * Use pink for spinner * Show ETA instead of elapsed * dim progress bar and adjust size to terminal width Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- lychee-bin/src/commands/check.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lychee-bin/src/commands/check.rs b/lychee-bin/src/commands/check.rs index 4a21e43..c9b5c02 100644 --- a/lychee-bin/src/commands/check.rs +++ b/lychee-bin/src/commands/check.rs @@ -127,11 +127,10 @@ async fn progress_bar_task( fn init_progress_bar() -> ProgressBar { 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"), + ProgressStyle::with_template( + "{spinner:.197.bright} {pos}/{len:.dim} ETA {eta} {bar:.dim} {wide_msg}", + ) + .expect("Valid progress bar"), ); bar.set_length(0); bar.set_message("Extracting links");