Get a styled indicatif progress bar for reuse across the project.
(items: u64)
| 2 | |
| 3 | /// Get a styled indicatif progress bar for reuse across the project. |
| 4 | pub fn get_progress_bar(items: u64) -> ProgressBar { |
| 5 | let bar = ProgressBar::new(items); |
| 6 | bar.set_style( |
| 7 | ProgressStyle::with_template( |
| 8 | "{spinner:.green} [{elapsed_precise}] [{bar:40.cyan/blue}] ({pos}/{len}, ETA {eta})", |
| 9 | ) |
| 10 | .expect("This progress syntax is valid"), |
| 11 | ); |
| 12 | |
| 13 | bar |
| 14 | } |
no outgoing calls