Преглед изворни кода

Replace unmaintained crate `term_size` by `terminal_size`

ariasuni пре 4 година
родитељ
комит
a85c72e2a0
3 измењених фајлова са 6 додато и 6 уклоњено
  1. 4 4
      Cargo.lock
  2. 1 1
      Cargo.toml
  3. 1 1
      src/output/mod.rs

+ 4 - 4
Cargo.lock

@@ -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"
-version = "0.3.2"
+name = "terminal_size"
+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",

+ 1 - 1
Cargo.toml

@@ -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"

+ 1 - 1
src/output/mod.rs

@@ -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()),
         }
         }
     }
     }
 }
 }