From 33aebc7406ef52c2cab26a469ed134e05a2b93fc Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Wed, 24 May 2023 07:34:12 -0700 Subject: [PATCH] Upgrade to indicatif 0.17 Reviewed By: lblasa Differential Revision: D46148852 fbshipit-source-id: 2a14f87c782829130b1b0b3c923c568e3eaa8d30 --- packer/Cargo.lock | 31 +++++++++++++++++++++++++++---- packer/Cargo.toml | 2 +- packer/src/main.rs | 1 + 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/packer/Cargo.lock b/packer/Cargo.lock index ca76d278d..55ca0b091 100644 --- a/packer/Cargo.lock +++ b/packer/Cargo.lock @@ -119,7 +119,9 @@ dependencies = [ "encode_unicode", "libc", "once_cell", + "regex", "terminal_size", + "unicode-width", "winapi", ] @@ -363,14 +365,14 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.16.2" +version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d207dc617c7a380ab07ff572a6e52fa202a2a8f355860ac9c38e23f8196be1b" +checksum = "cef509aa9bc73864d6756f0d34d35504af3cf0844373afe9b8669a5b8005a729" dependencies = [ "console", - "lazy_static", "number_prefix", - "regex", + "portable-atomic 0.3.20", + "unicode-width", ] [[package]] @@ -460,6 +462,21 @@ version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" +[[package]] +name = "portable-atomic" +version = "0.3.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e30165d31df606f5726b090ec7592c308a0eaf61721ff64c9a3018e344a8753e" +dependencies = [ + "portable-atomic 1.3.2", +] + +[[package]] +name = "portable-atomic" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc59d1bcc64fc5d021d67521f818db868368028108d37f0e98d74e33f68297b5" + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -807,6 +824,12 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" +[[package]] +name = "unicode-width" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" + [[package]] name = "unsafe-libyaml" version = "0.2.7" diff --git a/packer/Cargo.toml b/packer/Cargo.toml index 0db132b73..6dca4544f 100644 --- a/packer/Cargo.toml +++ b/packer/Cargo.toml @@ -20,7 +20,7 @@ sha2 = "0.10.6" data-encoding = "^2" serde_json = "^1" rayon = "^1.7" -indicatif = "^0.16" +indicatif = "^0.17" xz2 = "0.1.7" ignore = "0.4.20" diff --git a/packer/src/main.rs b/packer/src/main.rs index 8a5e79a33..e716d9756 100644 --- a/packer/src/main.rs +++ b/packer/src/main.rs @@ -106,6 +106,7 @@ fn default_progress_bar(len: u64) -> indicatif::ProgressBar { pb.set_style( indicatif::ProgressStyle::default_bar() .template("{prefix:.bold}▕{bar:.magenta}▏{msg}") + .expect("valid indicatif template") .progress_chars("█▓▒░ "), ); pb