mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Avoid removing progress bars (#362)
This was dumb of me. We pass out indexes when adding progress bars, but were then removing entries on completion, so any outstanding indexes were now _invalid_. We just shouldn't remove them. The `MultiProgress` retains a reference anyway, IIUC. Closes https://github.com/astral-sh/puffin/issues/360.
This commit is contained in:
parent
7abe141d3f
commit
3c24301193
1 changed files with 4 additions and 4 deletions
|
@ -266,8 +266,8 @@ impl puffin_resolver::ResolverReporter for ResolverReporter {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn on_build_complete(&self, distribution: &RemoteDistributionRef<'_>, index: usize) {
|
fn on_build_complete(&self, distribution: &RemoteDistributionRef<'_>, index: usize) {
|
||||||
let mut bars = self.bars.lock().unwrap();
|
let bars = self.bars.lock().unwrap();
|
||||||
let progress = bars.remove(index);
|
let progress = &bars[index];
|
||||||
progress.finish_with_message(format!(
|
progress.finish_with_message(format!(
|
||||||
"{} {}",
|
"{} {}",
|
||||||
"Built".bold().green(),
|
"Built".bold().green(),
|
||||||
|
@ -296,8 +296,8 @@ impl puffin_resolver::ResolverReporter for ResolverReporter {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn on_checkout_complete(&self, url: &Url, rev: &str, index: usize) {
|
fn on_checkout_complete(&self, url: &Url, rev: &str, index: usize) {
|
||||||
let mut bars = self.bars.lock().unwrap();
|
let bars = self.bars.lock().unwrap();
|
||||||
let progress = bars.remove(index);
|
let progress = &bars[index];
|
||||||
progress.finish_with_message(format!(
|
progress.finish_with_message(format!(
|
||||||
"{} {} ({})",
|
"{} {} ({})",
|
||||||
"Updated".bold().green(),
|
"Updated".bold().green(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue