From 9bb0fd8d7bd885861bd0fbd65f8e98e16608d3d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Frosteg=C3=A5rd?= Date: Sat, 12 Nov 2022 14:40:24 +0100 Subject: [PATCH] Update indicatif to version 0.17 --- Cargo.lock | 15 +++++++++++---- aquatic_udp_bench/Cargo.toml | 2 +- aquatic_udp_bench/src/common.rs | 4 +++- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7394978..087a09b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -664,6 +664,7 @@ dependencies = [ "lazy_static", "libc", "terminal_size", + "unicode-width", "winapi 0.3.9", ] @@ -1487,14 +1488,14 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.16.2" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d207dc617c7a380ab07ff572a6e52fa202a2a8f355860ac9c38e23f8196be1b" +checksum = "4295cbb7573c16d310e99e713cf9e75101eb190ab31fccd35f2d2691b4352b19" dependencies = [ "console", - "lazy_static", "number_prefix", - "regex", + "portable-atomic", + "unicode-width", ] [[package]] @@ -2041,6 +2042,12 @@ dependencies = [ "plotters-backend", ] +[[package]] +name = "portable-atomic" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15eb2c6e362923af47e13c23ca5afb859e83d54452c55b0b9ac763b8f7c1ac16" + [[package]] name = "ppv-lite86" version = "0.2.17" diff --git a/aquatic_udp_bench/Cargo.toml b/aquatic_udp_bench/Cargo.toml index e9786d9..f45d1b0 100644 --- a/aquatic_udp_bench/Cargo.toml +++ b/aquatic_udp_bench/Cargo.toml @@ -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" diff --git a/aquatic_udp_bench/src/common.rs b/aquatic_udp_bench/src/common.rs index e3885d0..8952c3c 100644 --- a/aquatic_udp_bench/src/common.rs +++ b/aquatic_udp_bench/src/common.rs @@ -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) }