Skip to content

Commit

Permalink
Update progress bar style to match 1.12 progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
christiangnrd committed Oct 8, 2024
1 parent 6a6ddd4 commit a230ce7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ pub fn download_extract_sans_parent(
None => ProgressBar::new_spinner(),
};

pb.set_prefix(" Downloading:");
pb.set_prefix(" Downloading");
pb.set_style(
ProgressStyle::default_bar()
.template("{prefix:.cyan.bold} [{bar}] {bytes}/{total_bytes} eta: {eta}")
.template("{prefix:.cyan.bold}: {bar:.cyan/white} {bytes}/{total_bytes} eta: {eta}")
.unwrap()
.progress_chars("=> "),
.progress_chars("━╸━"),
);

let last_modified = match response
Expand Down Expand Up @@ -204,12 +204,12 @@ pub fn download_extract_sans_parent(
ProgressBar::new_spinner()
};

pb.set_prefix(" Downloading:");
pb.set_prefix(" Downloading");
pb.set_style(
ProgressStyle::default_bar()
.template("{prefix:.cyan.bold} [{bar}] {bytes}/{total_bytes} eta: {eta}")
.template("{prefix:.cyan.bold}: {bar:.cyan/white} {bytes}/{total_bytes} eta: {eta}")
.unwrap()
.progress_chars("=> "),
.progress_chars("━╸━"),
);

let response_with_pb = pb.wrap_read(DataReaderWrap(reader));
Expand Down

0 comments on commit a230ce7

Please sign in to comment.