(progress: &Progress, elapsed: Duration)
| 117 | } |
| 118 | |
| 119 | fn rate(progress: &Progress, elapsed: Duration) -> f64 { |
| 120 | if elapsed.is_zero() { |
| 121 | 0.0 |
| 122 | } else { |
| 123 | progress.published as f64 / elapsed.as_secs_f64() |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | fn eta(progress: &Progress, elapsed: Duration) -> String { |
| 128 | if progress.phase == "complete" { |