Replace unmaintained crate term_size by terminal_size

This commit is contained in:
ariasuni 2021-04-27 00:16:25 +02:00
parent 90b97753ad
commit a85c72e2a0
3 changed files with 6 additions and 6 deletions

8
Cargo.lock generated
View File

@ -72,7 +72,7 @@ dependencies = [
"number_prefix", "number_prefix",
"scoped_threadpool", "scoped_threadpool",
"term_grid", "term_grid",
"term_size", "terminal_size",
"unicode-width", "unicode-width",
"users", "users",
"zoneinfo_compiled", "zoneinfo_compiled",
@ -285,10 +285,10 @@ dependencies = [
] ]
[[package]] [[package]]
name = "term_size" name = "terminal_size"
version = "0.3.2" version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e4129646ca0ed8f45d09b929036bafad5377103edd06e50bf574b353d2b08d9" checksum = "86ca8ced750734db02076f44132d802af0b33b09942331f4459dde8636fd2406"
dependencies = [ dependencies = [
"libc", "libc",
"winapi", "winapi",

View File

@ -28,7 +28,7 @@ num_cpus = "1.10"
number_prefix = "0.4" number_prefix = "0.4"
scoped_threadpool = "0.1" scoped_threadpool = "0.1"
term_grid = "0.1" term_grid = "0.1"
term_size = "0.3" terminal_size = "0.1.16"
unicode-width = "0.1" unicode-width = "0.1"
users = "0.11" users = "0.11"
zoneinfo_compiled = "0.5.1" zoneinfo_compiled = "0.5.1"

View File

@ -55,7 +55,7 @@ impl TerminalWidth {
match self { match self {
Self::Set(width) => Some(width), 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()),
} }
} }
} }