Closed DanGonite57 closed 6 months ago
Your suggestion makes sense but I probably won't have time to look at an implementation soon. However, if you're able to dig in and submit a PR I'd be happy to answer any questions you have and review your code.
Hi, thanks for your reply. I appear to have found a simple solution by using the current position of the progress bar rather than the total length, which corrects the behaviour of Abandon
ed progress bars, but maintains the current behaviour for AndLeave
since their pos is updated on completion.
When progression of a progress bar with
.with_finish(ProgressFinish::Abandon)
ends early, the position of the bar is retained at the point that it stopped. However, the per_sec keys (per_sec
,bytes_per_sec
,binary_bytes_per_sec
) are all updated as if the rest of the progress had been completed instantly. I would suggest that these values should also be kept as they were when progression was abandoned.env:
rustc 1.73.0 (cc66ad468 2023-10-03)
cargo.toml:
indicatif = "0.17.7"
Arbitrary example:
Output: