summaryrefslogtreecommitdiff
path: root/src/tui.rs
blob: df3504dc94e77428a322a5a3941206ff52b550f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use indicatif::{ProgressBar, ProgressStyle};

pub fn make_progress_bar(size: u64) -> ProgressBar {
    let bar = ProgressBar::new(size);
    bar.set_style(
        ProgressStyle::with_template(
            "{elapsed_precise:.white.dim} {wide_bar:.cyan} {bytes}/{total_bytes} ({bytes_per_sec}, {eta})",
        )
        .unwrap()
        .progress_chars("█▉▊▋▌▍▎▏  "),
    );

    bar
}