Main: Add percent to progress bar

This commit is contained in:
networkException 2025-01-03 17:50:06 +01:00
parent 24398c0994
commit 1e88c1cca8
Signed by: networkException
GPG key ID: E3877443AE684391

View file

@ -72,7 +72,7 @@ fn run() -> Result<()> {
let progress_bar = ProgressBar::new(hashed_files.len() as u64) let progress_bar = ProgressBar::new(hashed_files.len() as u64)
.with_finish(ProgressFinish::AndLeave) .with_finish(ProgressFinish::AndLeave)
.with_style(ProgressStyle::default_bar() .with_style(ProgressStyle::default_bar()
.template("Hashing files... {bar} {pos:>7}/{len:7} [{elapsed_precise}]").unwrap()); .template("Hashing files... {bar} {percent_precise}% {pos:>7}/{len:7} [{elapsed_precise}]").unwrap());
let throughput_spinner = ProgressBar::new_spinner() let throughput_spinner = ProgressBar::new_spinner()
.with_style(ProgressStyle::default_spinner() .with_style(ProgressStyle::default_spinner()