From f2de20a80094b474f8c19333afae0ebe687c0db3 Mon Sep 17 00:00:00 2001 From: Brett Date: Thu, 2 Apr 2020 08:25:55 -0600 Subject: [PATCH] use indicatif 0.14 --- Cargo.lock | 242 ++-------------------- Cargo.toml | 5 +- src/commands/build/build.rs | 6 +- src/commands/build/checks/clear.rs | 4 - src/commands/build/checks/modtime.rs | 3 - src/commands/build/checks/names.rs | 4 - src/commands/build/prebuild/preprocess.rs | 4 - src/commands/build/prebuild/render.rs | 4 - src/flow/mod.rs | 7 +- src/flow/task.rs | 3 - src/utilities/translation.rs | 6 +- 11 files changed, 22 insertions(+), 266 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f9292c43..dfba3a12 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -72,12 +72,6 @@ dependencies = [ "winapi 0.3.8", ] -[[package]] -name = "autocfg" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" - [[package]] name = "autocfg" version = "1.0.0" @@ -255,15 +249,6 @@ dependencies = [ "winapi 0.3.8", ] -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags", -] - [[package]] name = "colored" version = "1.9.3" @@ -349,7 +334,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" dependencies = [ - "autocfg 1.0.0", + "autocfg", "cfg-if", "crossbeam-utils", "lazy_static", @@ -374,7 +359,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" dependencies = [ - "autocfg 1.0.0", + "autocfg", "cfg-if", "lazy_static", ] @@ -659,8 +644,7 @@ dependencies = [ "git2", "glob", "handlebars", - "indicatif 0.11.0", - "indicatif-windows", + "indicatif 0.14.0", "lazy_static", "linked-hash-map 0.5.2", "num_cpus", @@ -790,20 +774,7 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292" dependencies = [ - "autocfg 1.0.0", -] - -[[package]] -name = "indicatif" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c60da1c9abea75996b70a931bba6c750730399005b61ccd853cee50ef3d0d0c" -dependencies = [ - "console", - "lazy_static", - "number_prefix 0.2.8", - "parking_lot 0.10.0", - "regex", + "autocfg", ] [[package]] @@ -814,21 +785,20 @@ checksum = "8572bccfb0665e70b7faf44ee28841b8e0823450cd4ad562a76b5a3c4bf48487" dependencies = [ "console", "lazy_static", - "number_prefix 0.3.0", + "number_prefix", "regex", ] [[package]] -name = "indicatif-windows" -version = "0.11.0" -source = "git+https://github.com/synixebrett/indicatif#250b5825e5ba5b91c8501adf90a02ae5b51d447d" +name = "indicatif" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a68371cf417889c9d7f98235b7102ea7c54fc59bcbd22f3dea785be9d27e40" dependencies = [ "console", "lazy_static", - "number_prefix 0.3.0", - "parking_lot 0.8.0", + "number_prefix", "regex", - "winapi 0.3.8", ] [[package]] @@ -962,24 +932,6 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" -[[package]] -name = "lock_api" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed946d4529956a20f2d63ebe1b69996d5a2137c91913fe3ebbeff957f5bca7ff" -dependencies = [ - "scopeguard", -] - -[[package]] -name = "lock_api" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79b2de95ecb4691949fea4716ca53cdbcfccb2c612e19644a8bad05edcf9f47b" -dependencies = [ - "scopeguard", -] - [[package]] name = "log" version = "0.4.8" @@ -1019,7 +971,7 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4fc2c02a7e374099d4ee95a193111f72d2110197fe200272371758f6c3643d8" dependencies = [ - "autocfg 1.0.0", + "autocfg", ] [[package]] @@ -1130,7 +1082,7 @@ version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" dependencies = [ - "autocfg 1.0.0", + "autocfg", "num-traits 0.2.11", ] @@ -1149,7 +1101,7 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" dependencies = [ - "autocfg 1.0.0", + "autocfg", ] [[package]] @@ -1162,15 +1114,6 @@ dependencies = [ "libc", ] -[[package]] -name = "number_prefix" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf9993e59c894e3c08aa1c2712914e9e6bf1fcbfc6bef283e2183df345a4fee" -dependencies = [ - "num-traits 0.2.11", -] - [[package]] name = "number_prefix" version = "0.3.0" @@ -1209,64 +1152,13 @@ version = "0.9.54" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1024c0a59774200a555087a6da3f253a9095a5f344e353b212ac4c8b8e450986" dependencies = [ - "autocfg 1.0.0", + "autocfg", "cc", "libc", "pkg-config", "vcpkg", ] -[[package]] -name = "parking_lot" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7767817701cce701d5585b9c4db3cdd02086398322c1d7e8bf5094a96a2ce7" -dependencies = [ - "lock_api 0.2.0", - "parking_lot_core 0.5.0", - "rustc_version", -] - -[[package]] -name = "parking_lot" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e98c49ab0b7ce5b222f2cc9193fc4efe11c6d0bd4f648e374684a6857b1cfc" -dependencies = [ - "lock_api 0.3.3", - "parking_lot_core 0.7.0", -] - -[[package]] -name = "parking_lot_core" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb88cb1cb3790baa6776844f968fea3be44956cf184fa1be5a03341f5491278c" -dependencies = [ - "cfg-if", - "cloudabi", - "libc", - "rand 0.6.5", - "redox_syscall", - "rustc_version", - "smallvec 0.6.13", - "winapi 0.3.8", -] - -[[package]] -name = "parking_lot_core" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7582838484df45743c8434fbff785e8edf260c28748353d44bc0da32e0ceabf1" -dependencies = [ - "cfg-if", - "cloudabi", - "libc", - "redox_syscall", - "smallvec 1.2.0", - "winapi 0.3.8", -] - [[package]] name = "pbo" version = "0.2.1" @@ -1448,25 +1340,6 @@ dependencies = [ "winapi 0.3.8", ] -[[package]] -name = "rand" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -dependencies = [ - "autocfg 0.1.7", - "libc", - "rand_chacha 0.1.1", - "rand_core 0.4.2", - "rand_hc 0.1.0", - "rand_isaac", - "rand_jitter", - "rand_os", - "rand_pcg", - "rand_xorshift", - "winapi 0.3.8", -] - [[package]] name = "rand" version = "0.7.3" @@ -1475,19 +1348,9 @@ checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ "getrandom", "libc", - "rand_chacha 0.2.2", + "rand_chacha", "rand_core 0.5.1", - "rand_hc 0.2.0", -] - -[[package]] -name = "rand_chacha" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" -dependencies = [ - "autocfg 0.1.7", - "rand_core 0.3.1", + "rand_hc", ] [[package]] @@ -1524,15 +1387,6 @@ dependencies = [ "getrandom", ] -[[package]] -name = "rand_hc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" -dependencies = [ - "rand_core 0.3.1", -] - [[package]] name = "rand_hc" version = "0.2.0" @@ -1542,59 +1396,6 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "rand_isaac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_jitter" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -dependencies = [ - "libc", - "rand_core 0.4.2", - "winapi 0.3.8", -] - -[[package]] -name = "rand_os" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -dependencies = [ - "cloudabi", - "fuchsia-cprng", - "libc", - "rand_core 0.4.2", - "rdrand", - "winapi 0.3.8", -] - -[[package]] -name = "rand_pcg" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" -dependencies = [ - "autocfg 0.1.7", - "rand_core 0.4.2", -] - -[[package]] -name = "rand_xorshift" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -dependencies = [ - "rand_core 0.3.1", -] - [[package]] name = "rayon" version = "1.3.0" @@ -1917,15 +1718,6 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" -[[package]] -name = "smallvec" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" -dependencies = [ - "maybe-uninit", -] - [[package]] name = "smallvec" version = "1.2.0" @@ -2170,7 +1962,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" dependencies = [ - "smallvec 1.2.0", + "smallvec", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 093c8b5c..6739c555 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,11 +38,8 @@ toml = "0.5" walkdir = "2.3" webbrowser = "0.5" zip = "0.5" +indicatif = "0.14" [target.'cfg(windows)'.dependencies] ansi_term = "0.12" winreg = "0.7" -indicatif-windows = { git = "https://github.com/synixebrett/indicatif", branch = "master" } - -[target.'cfg(not(windows))'.dependencies] -indicatif = "0.11" diff --git a/src/commands/build/build.rs b/src/commands/build/build.rs index 4e134e84..b77421ea 100644 --- a/src/commands/build/build.rs +++ b/src/commands/build/build.rs @@ -2,12 +2,8 @@ use std::collections::HashMap; use std::io::Cursor; use std::path::PathBuf; -#[cfg(not(windows))] -use indicatif::ProgressBar; -#[cfg(windows)] -use indicatif_windows::ProgressBar; - use glob::Pattern; +use indicatif::ProgressBar; use linked_hash_map::LinkedHashMap; use regex::Regex; use walkdir::WalkDir; diff --git a/src/commands/build/checks/clear.rs b/src/commands/build/checks/clear.rs index 5ba3a978..f1087f70 100644 --- a/src/commands/build/checks/clear.rs +++ b/src/commands/build/checks/clear.rs @@ -1,10 +1,6 @@ use std::path::PathBuf; -#[cfg(not(windows))] use indicatif::ProgressBar; -#[cfg(windows)] -use indicatif_windows::ProgressBar; - use regex::Regex; use strum::IntoEnumIterator; diff --git a/src/commands/build/checks/modtime.rs b/src/commands/build/checks/modtime.rs index 3f612b1d..e64bc3f3 100644 --- a/src/commands/build/checks/modtime.rs +++ b/src/commands/build/checks/modtime.rs @@ -1,10 +1,7 @@ use std::path::PathBuf; use std::time::{Duration, SystemTime}; -#[cfg(not(windows))] use indicatif::ProgressBar; -#[cfg(windows)] -use indicatif_windows::ProgressBar; use crate::{Addon, HEMTTError, Project, Report, Stage, Task}; diff --git a/src/commands/build/checks/names.rs b/src/commands/build/checks/names.rs index 93f7027f..aeb94e57 100644 --- a/src/commands/build/checks/names.rs +++ b/src/commands/build/checks/names.rs @@ -1,8 +1,4 @@ -#[cfg(not(windows))] use indicatif::ProgressBar; -#[cfg(windows)] -use indicatif_windows::ProgressBar; - use regex::Regex; use crate::{Addon, AddonLocation, HEMTTError, Project, Report, Stage, Task}; diff --git a/src/commands/build/prebuild/preprocess.rs b/src/commands/build/prebuild/preprocess.rs index c0c29969..70c8ae8d 100644 --- a/src/commands/build/prebuild/preprocess.rs +++ b/src/commands/build/prebuild/preprocess.rs @@ -1,11 +1,7 @@ use std::io::{Cursor, Read, Seek, SeekFrom}; use std::path::{Path, PathBuf}; -#[cfg(not(windows))] use indicatif::ProgressBar; -#[cfg(windows)] -use indicatif_windows::ProgressBar; - use regex::Regex; use walkdir::WalkDir; diff --git a/src/commands/build/prebuild/render.rs b/src/commands/build/prebuild/render.rs index c29c2561..7074db39 100644 --- a/src/commands/build/prebuild/render.rs +++ b/src/commands/build/prebuild/render.rs @@ -1,11 +1,7 @@ use std::io::Write; use std::path::Path; -#[cfg(not(windows))] use indicatif::ProgressBar; -#[cfg(windows)] -use indicatif_windows::ProgressBar; - use walkdir::WalkDir; use crate::{Addon, HEMTTError, Project, Report, Stage, Task}; diff --git a/src/flow/mod.rs b/src/flow/mod.rs index e9fdb080..6d045989 100644 --- a/src/flow/mod.rs +++ b/src/flow/mod.rs @@ -3,12 +3,8 @@ use std::thread; use std::time::Duration; use colored::*; -use rayon::prelude::*; - -#[cfg(not(windows))] use indicatif::{MultiProgress, ProgressBar, ProgressStyle}; -#[cfg(windows)] -use indicatif_windows::{MultiProgress, ProgressBar, ProgressStyle}; +use rayon::prelude::*; mod report; mod script; @@ -100,6 +96,7 @@ impl Flow { // Create a multiprogress bar let m = MultiProgress::new(); + //m.set_move_cursor(true); // Create the top bar let mut total = 0; let total_pb = m.add(ProgressBar::new(0)); diff --git a/src/flow/task.rs b/src/flow/task.rs index de3cc5f6..e25aa17d 100644 --- a/src/flow/task.rs +++ b/src/flow/task.rs @@ -1,7 +1,4 @@ -#[cfg(not(windows))] use indicatif::ProgressBar; -#[cfg(windows)] -use indicatif_windows::ProgressBar; use crate::{Addon, AddonList, HEMTTError, Project, Report, Stage}; diff --git a/src/utilities/translation.rs b/src/utilities/translation.rs index cc3a4c4e..98256a8b 100644 --- a/src/utilities/translation.rs +++ b/src/utilities/translation.rs @@ -2,16 +2,12 @@ use std::collections::HashMap; use std::io::BufReader; use std::path::PathBuf; +use indicatif::ProgressBar; use serde::Deserialize; use serde_xml_rs; use strum::IntoEnumIterator; use walkdir::WalkDir; -#[cfg(not(windows))] -use indicatif::ProgressBar; -#[cfg(windows)] -use indicatif_windows::ProgressBar; - use crate::{AddonLocation, Command, HEMTTError}; pub struct Translation {}