From a85c72e2a012000791988888deff28c12320d617 Mon Sep 17 00:00:00 2001 From: ariasuni Date: Tue, 27 Apr 2021 00:16:25 +0200 Subject: [PATCH] Replace unmaintained crate `term_size` by `terminal_size` --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- src/output/mod.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6a0665d..abe9afd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -72,7 +72,7 @@ dependencies = [ "number_prefix", "scoped_threadpool", "term_grid", - "term_size", + "terminal_size", "unicode-width", "users", "zoneinfo_compiled", @@ -285,10 +285,10 @@ dependencies = [ ] [[package]] -name = "term_size" -version = "0.3.2" +name = "terminal_size" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e4129646ca0ed8f45d09b929036bafad5377103edd06e50bf574b353d2b08d9" +checksum = "86ca8ced750734db02076f44132d802af0b33b09942331f4459dde8636fd2406" dependencies = [ "libc", "winapi", diff --git a/Cargo.toml b/Cargo.toml index 1d42204..abb484d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ num_cpus = "1.10" number_prefix = "0.4" scoped_threadpool = "0.1" term_grid = "0.1" -term_size = "0.3" +terminal_size = "0.1.16" unicode-width = "0.1" users = "0.11" zoneinfo_compiled = "0.5.1" diff --git a/src/output/mod.rs b/src/output/mod.rs index 0361d12..2c64010 100644 --- a/src/output/mod.rs +++ b/src/output/mod.rs @@ -55,7 +55,7 @@ impl TerminalWidth { match self { Self::Set(width) => Some(width), - Self::Automatic => term_size::dimensions_stdout().map(|t| t.0), + Self::Automatic => terminal_size::terminal_size().map(|(w, _)| w.0.into()), } } }