Skip to content

Commit

Permalink
Merge pull request #211 from sd2k/dependabot/cargo/indicatif-0.17.7
Browse files Browse the repository at this point in the history
Bump indicatif from 0.16.2 to 0.17.7
  • Loading branch information
sd2k authored Sep 26, 2023
2 parents acabb60 + 926703b commit ceb1b56
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 11 deletions.
23 changes: 19 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ clap = { version = "3.1.15", features = ["derive", "yaml"] }
csv = "1.2.2"
env_logger = "0.10.0"
flate2 = "1.0.27"
indicatif = "0.16.2"
indicatif = "0.17.7"
jemallocator = "0.5.4"
log = "0.4.20"
rand = "0.8.5"
Expand Down
11 changes: 5 additions & 6 deletions src/split/splitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ impl Splitter {
let name = p.name().to_string();
let style = ProgressStyle::default_bar()
.template("{msg:<10}: [{elapsed_precise}] {bar:40.cyan/blue} {pos:>7}/~{len:7} (ETA: {eta_precise})")
.expect("valid indicatif template")
.progress_chars("█▉▊▋▌▍▎▏ ");
let split_total = p.proportion * t as f64;
let pb = multi.add(ProgressBar::new(split_total as u64));
pb.set_draw_delta(10);
pb.set_message(name.clone());
pb.set_style(style);
(name, pb)
Expand All @@ -185,9 +185,9 @@ impl Splitter {
.map(|p| {
let name = p.name().to_string();
let style = ProgressStyle::default_bar()
.template("{msg:<10}: [{elapsed_precise}] {spinner:.green} {pos:>7}");
.template("{msg:<10}: [{elapsed_precise}] {spinner:.green} {pos:>7}")
.expect("valid indicatif template");
let pb = multi.add(ProgressBar::new_spinner());
pb.set_draw_delta(10);
pb.set_style(style);
pb.set_message(name.clone());
(name, pb)
Expand All @@ -200,9 +200,9 @@ impl Splitter {
let name = r.name().to_string();
let style = ProgressStyle::default_bar()
.template("{msg:<10}: [{elapsed_precise}] {bar:40.cyan/blue} {pos:>7}/{len:7} (ETA: {eta_precise})")
.expect("valid indicatif template")
.progress_chars("█▉▊▋▌▍▎▏ ");
let pb = multi.add(ProgressBar::new(r.total as u64));
pb.set_draw_delta(10);
pb.set_message(name.clone());
pb.set_style(style);
(name, pb)
Expand Down Expand Up @@ -277,7 +277,6 @@ impl Splitter {
}
}

scope.spawn(move |_| multi.join().unwrap());
let has_header = self.has_header;
{
for writer in chunk_writers {
Expand Down Expand Up @@ -338,7 +337,7 @@ impl Splitter {
SplitSelection::Done => break,
}
}
progress.values().for_each(|f| f.finish_at_current_pos());
progress.values().for_each(|f| f.finish());
info!("Finished writing to files");

for (_, sender) in senders {
Expand Down

0 comments on commit ceb1b56

Please sign in to comment.