Closed azriel91 closed 1 year ago
Heya, would allowing a progress bar's length to be set to None be a sensible thing to support?
None
Currently ProgressBar::set_length takes len: u64, and internally sets its state's length to Some(len). In my usage of indicatif, I want to:
ProgressBar::set_length
len: u64
Some(len)
indicatif
That said, as it stands, I think I could achieve the same effect by removing and adding bars, instead of reusing an existing bar.
Yeah, I'm not sure it makes sense to support this use case. You could instead set the length to 0, or remove/add bars as needed.
cool thanks!
Heya, would allowing a progress bar's length to be set to
None
be a sensible thing to support?Currently
ProgressBar::set_length
takeslen: u64
, and internally sets its state's length toSome(len)
. In my usage ofindicatif
, I want to:None
orSome(len)
, depending on the discovered work.That said, as it stands, I think I could achieve the same effect by removing and adding bars, instead of reusing an existing bar.