Skip to content

Commit

Permalink
remove progress bars once done
Browse files Browse the repository at this point in the history
  • Loading branch information
baszalmstra committed Sep 6, 2024
1 parent 8503031 commit 9a8c5b8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/render/package_cache_reporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,17 @@ impl PackageCacheReporterInner {
}
}

impl Drop for PackageCacheReporterInner {
fn drop(&mut self) {
if let Some(pb) = self.validation_pb.take() {
pb.finish_and_clear();
}
if let Some(pb) = self.download_pb.take() {
pb.finish_and_clear();
}
}
}

fn format_progress_message(remaining: Vec<&ProgressEntry>) -> String {
let mut msg = String::new();
let largest_package = remaining.iter().max_by_key(|e| e.size.unwrap_or(0));
Expand Down

0 comments on commit 9a8c5b8

Please sign in to comment.