Describe the bug
Misleading output: With a tasks_count of 0, the output produced by the Display implementation for Eta will be misleading. It might show progress as NaN% or an incorrect percentage, and the remaining time might also be incorrect.
To Reproduce
Steps to reproduce the behavior:
- Write the following code:
use eta;
fn main () {
let eta = Eta::new(0, TimeAcc::SEC);
println!("Eta: {}", eta);
}
- run
cargo build
Resultant behavior
Eta: 0 0 0
0
0/0: NaN% (0s remaining)
Expected behavior
No possibility to create ETA with 0 tasks_count or:
Eta: 0 0 0
0
0/0: 0% (0s remaining)
Describe the bug
Misleading output: With a tasks_count of 0, the output produced by the Display implementation for Eta will be misleading. It might show progress as NaN% or an incorrect percentage, and the remaining time might also be incorrect.
To Reproduce
Steps to reproduce the behavior:
cargo buildResultant behavior
Expected behavior
No possibility to create ETA with 0 tasks_count or:
Eta: 0 0 0
0
0/0: 0% (0s remaining)