For situations where the length of a progress bar can only be discovered after some processing, it might be more appropriate to show an empty bar rather than a full one of length 0 (0/0 is represented with a ratio of 1.0).
This PR introduces a new constructor, ProgressBar::empty(), and a new method, ProgressBar::unset_length(). These two allow library users to have a length of None, which is represented as a ratio of 0.0, achieving the empty state.
For situations where the length of a progress bar can only be discovered after some processing, it might be more appropriate to show an empty bar rather than a full one of length 0 (
0/0
is represented with a ratio of1.0
).This PR introduces a new constructor,
ProgressBar::empty()
, and a new method,ProgressBar::unset_length()
. These two allow library users to have a length ofNone
, which is represented as a ratio of0.0
, achieving the empty state.