MCPcopy Create free account
hub / github.com/archlinux/alpm / get_progress_bar

Function get_progress_bar

dev-scripts/src/ui.rs:4–14  ·  view source on GitHub ↗

Get a styled indicatif progress bar for reuse across the project.

(items: u64)

Source from the content-addressed store, hash-verified

2
3/// Get a styled indicatif progress bar for reuse across the project.
4pub 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}

Callers 4

run_testsMethod · 0.85
sync_remote_packagesMethod · 0.85

Calls

no outgoing calls

Tested by 1

run_testsMethod · 0.68