fn create_progress_bars() -> (MultiProgress, Vec<ProgressBar>) {
    let m = MultiProgress::with_draw_target(ProgressDrawTarget::stdout_nohz());
    let sty_file = ProgressStyle::default_bar()
        .template("{spinner:.green} [{elapsed_precise}] [{bar:40.cyan/blue}] {bytes}/{total_bytes} ({bytes_per_sec}, {eta})  File")
        .progress_chars("##-");
    let sty_transfer = ProgressStyle::default_bar()
        .template("{spinner:.green} [{elapsed_precise}] [{bar:40.cyan/blue}] {bytes}/{total_bytes} ({bytes_per_sec}, {eta})  Transfer")
        .progress_chars("##-");
    let sty_path = ProgressStyle::default_bar().template("{msg}");

    // first bar just prints path of file downloading.
    // second bar is for single file progress, in bytes.
    // third bar is for entire transfer progress, in bytes.
    let b1 = m.add(ProgressBar::new(100));
    let b2 = m.add(ProgressBar::new(100));
    let b3 = m.add(ProgressBar::new(100));

    b1.set_style(sty_path);
    b2.set_style(sty_file);
    b3.set_style(sty_transfer);

    let bars = vec![b1, b2, b3];

    (m, bars)
}
// Creates and inits the progress bars.
// We use 3. The first just reports the path.
// The 2nd and 3rd represent File progress and Transfer progress respectively.
Creates and inits the progress bars.
We use 3. The first just reports the path.
The 2nd and 3rd represent File progress and Transfer progress respectively.
Creates and inits the progress bars . We use 3 . The first just reports the path . The 2nd and 3rd represent File progress and Transfer progress respectively .
fn create_progress_bars() -> (MultiProgress, Vec<ProgressBar>) {
    let m = MultiProgress::with_draw_target(ProgressDrawTarget::stdout_nohz());
    let sty_file = ProgressStyle::default_bar()
        .template("{spinner:.green} [{elapsed_precise}] [{bar:40.cyan/blue}] {bytes}/{total_bytes} ({bytes_per_sec}, {eta})  File")
        .progress_chars("##-");
    let sty_transfer = ProgressStyle::default_bar()
        .template("{spinner:.green} [{elapsed_precise}] [{bar:40.cyan/blue}] {bytes}/{total_bytes} ({bytes_per_sec}, {eta})  Transfer")
        .progress_chars("##-");
    let sty_path = ProgressStyle::default_bar().template("{msg}");
    // first bar just prints path of file downloading.
    // second bar is for single file progress, in bytes.
    // third bar is for entire transfer progress, in bytes.
    let b1 = m.add(ProgressBar::new(100));
    let b2 = m.add(ProgressBar::new(100));
    let b3 = m.add(ProgressBar::new(100));
    b1.set_style(sty_path);
    b2.set_style(sty_file);
    b3.set_style(sty_transfer);
    let bars = vec![b1, b2, b3];
    (m, bars)
}
fn create_progress_bars ( ) -> ( MultiProgress , Vec < ProgressBar > ) { let m = MultiProgress :: with_draw_target ( ProgressDrawTarget :: stdout_nohz ( ) ) ; let sty_file = ProgressStyle :: default_bar ( ) . template ( " " ) . progress_chars ( " " ) ; let sty_transfer = ProgressStyle :: default_bar ( ) . template ( " " ) . progress_chars ( " " ) ; let sty_path = ProgressStyle :: default_bar ( ) . template ( " " ) ; // first bar just prints path of file downloading. // second bar is for single file progress, in bytes. // third bar is for entire transfer progress, in bytes. let b1 = m . add ( ProgressBar :: new ( 100 ) ) ; let b2 = m . add ( ProgressBar :: new ( 100 ) ) ; let b3 = m . add ( ProgressBar :: new ( 100 ) ) ; b1 . set_style ( sty_path ) ; b2 . set_style ( sty_file ) ; b3 . set_style ( sty_transfer ) ; let bars = vec ! [ b1 b2 b3 ] ; ( m , bars ) }
Creates and inits the progress bars.
Creates and inits the progress bars .