From 562c07eddd45f859e568921d3c0f2a7d5d9d8063 Mon Sep 17 00:00:00 2001 From: Joel Natividad <1980690+jqnatividad@users.noreply.github.com> Date: Sat, 8 Jun 2024 08:50:43 -0400 Subject: [PATCH] `foreach`: only enable progress-bar for qsv full build - not qsvlite, nor qsvdp --- src/cmd/foreach.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cmd/foreach.rs b/src/cmd/foreach.rs index 10a666e43..06a8782aa 100644 --- a/src/cmd/foreach.rs +++ b/src/cmd/foreach.rs @@ -77,7 +77,7 @@ use std::{ str::FromStr, }; -#[cfg(any(feature = "feature_capable", feature = "lite"))] +#[cfg(feature = "feature_capable")] use indicatif::{ProgressBar, ProgressDrawTarget}; #[cfg(target_family = "windows")] use local_encoding::windows::multi_byte_to_wide_char; @@ -180,12 +180,12 @@ pub fn run(argv: &[&str]) -> CliResult<()> { let mut cmd_args_string; // prep progress bar - #[cfg(any(feature = "feature_capable", feature = "lite"))] + #[cfg(feature = "feature_capable")] let show_progress = (args.flag_progressbar || util::get_envvar_flag("QSV_PROGRESSBAR")) && !rconfig.is_stdin(); - #[cfg(any(feature = "feature_capable", feature = "lite"))] + #[cfg(feature = "feature_capable")] let progress = ProgressBar::with_draw_target(None, ProgressDrawTarget::stderr_with_hz(5)); - #[cfg(any(feature = "feature_capable", feature = "lite"))] + #[cfg(feature = "feature_capable")] if show_progress { util::prep_progress(&progress, util::count_rows(&rconfig)?); } else { @@ -193,7 +193,7 @@ pub fn run(argv: &[&str]) -> CliResult<()> { } while rdr.read_byte_record(&mut record)? { - #[cfg(any(feature = "feature_capable", feature = "lite"))] + #[cfg(feature = "feature_capable")] if show_progress { progress.inc(1); } @@ -287,7 +287,7 @@ pub fn run(argv: &[&str]) -> CliResult<()> { cmd.wait()?; } } - #[cfg(any(feature = "feature_capable", feature = "lite"))] + #[cfg(feature = "feature_capable")] if show_progress { util::finish_progress(&progress); }