From 659f4b845149e0847b38f927a6c1c96df69164dd Mon Sep 17 00:00:00 2001 From: stringhandler Date: Wed, 19 Oct 2022 16:00:52 +0200 Subject: [PATCH] chore: update crossterm (#4824) Description --- Fixes https://github.com/tari-project/tari/security/dependabot/157 (hopefully) --- Cargo.lock | 105 ++++-------------- applications/tari_console_wallet/Cargo.toml | 2 +- .../tari_console_wallet/src/ui/mod.rs | 2 +- .../tari_merge_mining_proxy/Cargo.toml | 2 +- .../tari_merge_mining_proxy/src/main.rs | 5 +- applications/tari_miner/Cargo.toml | 2 +- applications/tari_miner/src/main.rs | 8 +- 7 files changed, 29 insertions(+), 97 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 68d0fff4c3..d13e4eaf11 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1043,22 +1043,6 @@ dependencies = [ "cfg-if 1.0.0", ] -[[package]] -name = "crossterm" -version = "0.17.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f4919d60f26ae233e14233cc39746c8c8bb8cd7b05840ace83604917b51b6c7" -dependencies = [ - "bitflags 1.3.2", - "crossterm_winapi 0.6.2", - "lazy_static", - "libc", - "mio 0.7.14", - "parking_lot 0.10.2", - "signal-hook 0.1.17", - "winapi", -] - [[package]] name = "crossterm" version = "0.20.0" @@ -1070,7 +1054,7 @@ dependencies = [ "libc", "mio 0.7.14", "parking_lot 0.11.2", - "signal-hook 0.3.14", + "signal-hook", "signal-hook-mio", "winapi", ] @@ -1087,17 +1071,24 @@ dependencies = [ "libc", "mio 0.8.4", "parking_lot 0.12.1", - "signal-hook 0.3.14", + "signal-hook", "signal-hook-mio", "winapi", ] [[package]] -name = "crossterm_winapi" -version = "0.6.2" +name = "crossterm" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2265c3f8e080075d9b6417aa72293fc71662f34b4af2612d8d1b074d29510db" +checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" dependencies = [ + "bitflags 1.3.2", + "crossterm_winapi 0.9.0", + "libc", + "mio 0.8.4", + "parking_lot 0.12.1", + "signal-hook", + "signal-hook-mio", "winapi", ] @@ -2401,15 +2392,6 @@ dependencies = [ "supercow", ] -[[package]] -name = "lock_api" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard", -] - [[package]] name = "lock_api" version = "0.4.9" @@ -3065,16 +3047,6 @@ dependencies = [ "libm 0.1.4", ] -[[package]] -name = "parking_lot" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.7.2", -] - [[package]] name = "parking_lot" version = "0.11.2" @@ -3082,7 +3054,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", - "lock_api 0.4.9", + "lock_api", "parking_lot_core 0.8.5", ] @@ -3092,24 +3064,10 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ - "lock_api 0.4.9", + "lock_api", "parking_lot_core 0.9.3", ] -[[package]] -name = "parking_lot_core" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi", - "libc", - "redox_syscall 0.1.57", - "smallvec", - "winapi", -] - [[package]] name = "parking_lot_core" version = "0.8.5" @@ -3119,7 +3077,7 @@ dependencies = [ "cfg-if 1.0.0", "instant", "libc", - "redox_syscall 0.2.16", + "redox_syscall", "smallvec", "winapi", ] @@ -3132,7 +3090,7 @@ checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.2.16", + "redox_syscall", "smallvec", "windows-sys", ] @@ -3746,12 +3704,6 @@ dependencies = [ "rand_core 0.3.1", ] -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - [[package]] name = "redox_syscall" version = "0.2.16" @@ -3768,7 +3720,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom 0.2.7", - "redox_syscall 0.2.16", + "redox_syscall", "thiserror", ] @@ -4325,17 +4277,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" -[[package]] -name = "signal-hook" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e31d442c16f047a671b5a71e2161d6e68814012b7f5379d269ebd915fac2729" -dependencies = [ - "libc", - "mio 0.7.14", - "signal-hook-registry", -] - [[package]] name = "signal-hook" version = "0.3.14" @@ -4355,7 +4296,7 @@ dependencies = [ "libc", "mio 0.7.14", "mio 0.8.4", - "signal-hook 0.3.14", + "signal-hook", ] [[package]] @@ -4919,7 +4860,7 @@ dependencies = [ "chrono", "clap 3.2.22", "config", - "crossterm 0.17.7", + "crossterm 0.25.0", "digest 0.9.0", "futures 0.3.24", "log", @@ -5105,7 +5046,7 @@ dependencies = [ "chrono", "clap 3.2.22", "config", - "crossterm 0.17.7", + "crossterm 0.25.0", "derivative", "futures 0.3.24", "hex", @@ -5157,7 +5098,7 @@ dependencies = [ "clap 3.2.22", "config", "crossbeam", - "crossterm 0.17.7", + "crossterm 0.25.0", "derivative", "futures 0.3.24", "hex", @@ -5448,7 +5389,7 @@ dependencies = [ "cfg-if 1.0.0", "fastrand", "libc", - "redox_syscall 0.2.16", + "redox_syscall", "remove_dir_all", "winapi", ] @@ -5504,7 +5445,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5fdfe0627923f7411a43ec9ec9c39c3a9b4151be313e0922042581fb6c9b717f" dependencies = [ "libc", - "redox_syscall 0.2.16", + "redox_syscall", "winapi", ] diff --git a/applications/tari_console_wallet/Cargo.toml b/applications/tari_console_wallet/Cargo.toml index 6b30325977..19d038c921 100644 --- a/applications/tari_console_wallet/Cargo.toml +++ b/applications/tari_console_wallet/Cargo.toml @@ -31,7 +31,7 @@ bitflags = "1.2.1" chrono = { version = "0.4.19", default-features = false } clap = { version = "3.1.1", features = ["derive", "env"] } config = "0.13.0" -crossterm = { version = "0.17" } +crossterm = { version = "0.25.0" } digest = "0.9.0" futures = { version = "^0.3.16", default-features = false, features = ["alloc"] } log = { version = "0.4.8", features = ["std"] } diff --git a/applications/tari_console_wallet/src/ui/mod.rs b/applications/tari_console_wallet/src/ui/mod.rs index 4d99f0d263..838e1ca1f5 100644 --- a/applications/tari_console_wallet/src/ui/mod.rs +++ b/applications/tari_console_wallet/src/ui/mod.rs @@ -32,7 +32,7 @@ pub mod state; mod ui_contact; mod ui_error; mod widgets; -use std::io::{stdout, Stdout, Write}; +use std::io::{stdout, Stdout}; pub use app::*; use crossterm::{ diff --git a/applications/tari_merge_mining_proxy/Cargo.toml b/applications/tari_merge_mining_proxy/Cargo.toml index 6fab0f4765..8f46ef29e2 100644 --- a/applications/tari_merge_mining_proxy/Cargo.toml +++ b/applications/tari_merge_mining_proxy/Cargo.toml @@ -21,7 +21,7 @@ tari_base_node_grpc_client = {path="../../clients/rust/base_node_grpc_client" } tari_wallet_grpc_client = {path="../../clients/rust/wallet_grpc_client" } anyhow = "1.0.53" -crossterm = { version = "0.17" } +crossterm = { version = "0.25.0" } bincode = "1.3.1" bytes = "1.1" chrono = { version = "0.4.6", default-features = false } diff --git a/applications/tari_merge_mining_proxy/src/main.rs b/applications/tari_merge_mining_proxy/src/main.rs index 274bb60321..2ff1a9e209 100644 --- a/applications/tari_merge_mining_proxy/src/main.rs +++ b/applications/tari_merge_mining_proxy/src/main.rs @@ -31,10 +31,7 @@ mod proxy; #[cfg(test)] mod test; -use std::{ - convert::Infallible, - io::{stdout, Write}, -}; +use std::{convert::Infallible, io::stdout}; use clap::Parser; use crossterm::{execute, terminal::SetTitle}; diff --git a/applications/tari_miner/Cargo.toml b/applications/tari_miner/Cargo.toml index 3dffbc295d..4815cc3104 100644 --- a/applications/tari_miner/Cargo.toml +++ b/applications/tari_miner/Cargo.toml @@ -17,7 +17,7 @@ tari_app_grpc = { path = "../tari_app_grpc" } tari_crypto = { git = "https://github.com/tari-project/tari-crypto.git", tag = "v0.15.6" } tari_utilities = { git = "https://github.com/tari-project/tari_utilities.git", tag="v0.4.7" } -crossterm = { version = "0.17" } +crossterm = { version = "0.25.0" } clap = { version = "3.1.1", features = ["derive"] } crossbeam = "0.8" futures = "0.3" diff --git a/applications/tari_miner/src/main.rs b/applications/tari_miner/src/main.rs index 21ee1eff69..d1b5e36a00 100644 --- a/applications/tari_miner/src/main.rs +++ b/applications/tari_miner/src/main.rs @@ -20,13 +20,7 @@ // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE // USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -use std::{ - convert::TryFrom, - io::{stdout, Write}, - str::FromStr, - thread, - time::Instant, -}; +use std::{convert::TryFrom, io::stdout, str::FromStr, thread, time::Instant}; use clap::Parser; use crossterm::{execute, terminal::SetTitle};