Update indicatif to version 0.17

This commit is contained in:
Joakim Frostegård 2022-11-12 14:40:24 +01:00
parent 9ace8f53b8
commit 9bb0fd8d7b
3 changed files with 15 additions and 6 deletions

View file

@ -19,7 +19,7 @@ aquatic_udp_protocol.workspace = true
anyhow = "1"
crossbeam-channel = "0.5"
indicatif = "0.16"
indicatif = "0.17"
mimalloc = { version = "0.1", default-features = false }
num-format = "0.4"
rand_distr = "0.4"

View file

@ -9,7 +9,9 @@ pub const NUM_INFO_HASHES: usize = 10_000;
pub fn create_progress_bar(name: &str, iterations: u64) -> ProgressBar {
let t = format!("{:<8} {}", name, "{wide_bar} {pos:>2}/{len:>2}");
let style = ProgressStyle::default_bar().template(&t);
let style = ProgressStyle::default_bar()
.template(&t)
.expect("setup indicatif template");
ProgressBar::new(iterations).with_style(style)
}