a8m / a8m/pb

Support progress without known total

Abierto
#63 0 comentarios 1 reacción 0 asignados Ver en GitHub
Lenguaje dominante
Rust
Estrellas
600
Forks
59
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
rust
Área
cli, tooling
Tipo de issue
Nueva funcionalidad
Dificultad
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Estancado
Claridad
Bien especificado
Aptitud para principiantes
55/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.