a8m / a8m/pb

Support progress without known total

Ouverte
#63 0 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
Langage dominant
Rust
Étoiles
600
Forks
59
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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 `{}`

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
rust
Domaine
cli, tooling
Type d'issue
Fonctionnalité
Difficulté
2/5
Temps estimé
1-3 heures
Activité
À l'abandon
Clarté
Clairement spécifiée
Accessibilité débutants
55/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.