a8m / a8m/pb

Support progress without known total

Aperta
#63 0 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
600
Fork
59
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I'd like to use a progress indicator showing time and thoughput, current total bytes.

Currently the counter box always shows the total:
```rust
// counter box
if self.show_counter {
let (c, t) = (self.current as f64, self.total as f64);
prefix = prefix +
&match self.units {
Units::Default => format!("{} / {} ", c, t),
Units::Bytes => format!("{} / {} ", kb_fmt!(c), kb_fmt!(t)),
};
}
```

Maybe a `show_total` could be added which switches to another counter format string like `{}`

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

The issue points to the counter box logic in the codebase, likely in a file like `src/lib.rs` or `src/progress.rs`. Look for the `show_counter` field and the `Units` enum. Add a `show_total` boolean field to the progress bar struct and adjust the formatting logic to conditionally show the total. Check existing tests for the progress bar to understand how to verify the change.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
rust
Ambito
cli, tooling
Tipo di issue
Funzionalità
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
55/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.