Skip to content

Commit

Permalink
Build-CLI UI: Change jobs placeholder to spaces
Browse files Browse the repository at this point in the history
- Change job numbers placeholder from zero to spaces in tracker
  • Loading branch information
AmmarAbouZor authored and DmitryAstafyev committed Jan 16, 2024
1 parent 9ca70ab commit 2de0186
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cli/src/tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,8 @@ impl Tracker {
bars.insert(sequence, (bar, Instant::now(), job, None));
bars.iter_mut().for_each(|(k, (bar, _, job, result))| {
bar.set_prefix(format!(
"[{:0seq_width$}/{:0seq_width$}][{}][{job}]",
"[{:seq_width$}/{sequence_txt}][{}][{job}]",
k,
sequence_txt,
result
.as_ref()
.map_or_else(|| String::from("...."), |res| res.to_string()),
Expand Down Expand Up @@ -101,9 +100,8 @@ impl Tracker {
if let Some((bar, instant, job, res)) = bars.get_mut(&seq) {
let sequence_txt = sequence.to_string();
bar.set_prefix(format!(
"[{:0seq_width$}/{:0seq_width$}][{}][{job}]",
"[{:seq_width$}/{sequence_txt}][{}][{job}]",
seq,
sequence_txt,
result,
seq_width = sequence_txt.len()
));
Expand Down

0 comments on commit 2de0186

Please sign in to comment.