Skip to content

Commit 900c976

Browse files
committed
Fix progress bar spacing and cleanup
- Use finish_and_clear() instead of finish_with_message() to avoid leaving spinner character - Print completion message separately to stderr - Proper spacing between spinner and message in template - No leading space in messages
1 parent 52d7df3 commit 900c976

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/main.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -497,10 +497,10 @@ fn main() -> Result<()> {
497497
let pb = ProgressBar::new_spinner();
498498
pb.set_style(
499499
ProgressStyle::default_spinner()
500-
.template("{spinner:.green}{msg}")
500+
.template("{spinner:.green} {msg}")
501501
.unwrap(),
502502
);
503-
pb.set_message(" [sweepga] Filtering PAF records...");
503+
pb.set_message("[sweepga] Filtering PAF records...");
504504
Some(pb)
505505
} else {
506506
None
@@ -585,7 +585,10 @@ fn main() -> Result<()> {
585585
}
586586

587587
if let Some(pb) = progress {
588-
pb.finish_with_message(" [sweepga] Filtering complete");
588+
pb.finish_and_clear();
589+
if !args.quiet {
590+
eprintln!("[sweepga] Filtering complete");
591+
}
589592
}
590593

591594
Ok(())

0 commit comments

Comments
 (0)