console-rs / indicatif

A command line progress reporting library for Rust
MIT License
4.36k stars 241 forks source link

`inc` is call before actual work in examples #521

Closed tatref closed 1 year ago

tatref commented 1 year ago

Hi,

In some examples, inc is call before "work", for example in the single.rs example, we call inc, then sleep the next line:

https://github.com/console-rs/indicatif/blob/fb8d0e0c912104d30554d3a1ce09990f3bd430a8/examples/single.rs#L9

Should it be called after the heavy lifting?

djc commented 1 year ago

Probably. Want to submit a PR?

tatref commented 1 year ago

Sure! I just wanted to be sure that my assumption was correct

chris-laplante commented 1 year ago

Closing since PR was merged