Use termize instead of term_size

This commit is contained in:
John Kåre Alsaker 2020-01-29 01:13:48 +01:00
parent 3761dcd346
commit b0b11d31a2
4 changed files with 14 additions and 4 deletions

View File

@ -3540,8 +3540,8 @@ dependencies = [
"rustc_data_structures",
"rustc_span",
"serialize",
"term_size",
"termcolor",
"termize",
"unicode-width",
"winapi 0.3.8",
]
@ -4580,6 +4580,16 @@ dependencies = [
"redox_termios",
]
[[package]]
name = "termize"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1706be6b564323ce7092f5f7e6b118a14c8ef7ed0e69c8c5329c914a9f101295"
dependencies = [
"libc",
"winapi 0.3.8",
]
[[package]]
name = "test"
version = "0.0.0"

View File

@ -18,7 +18,7 @@ unicode-width = "0.1.4"
atty = "0.2"
termcolor = "1.0"
annotate-snippets = "0.6.1"
term_size = "0.3.1"
termize = "0.1.1"
[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3", features = ["handleapi", "synchapi", "winbase"] }

View File

@ -1366,7 +1366,7 @@ impl EmitterWriter {
} else if self.ui_testing {
140
} else {
term_size::dimensions()
termize::dimensions()
.map(|(w, _)| w.saturating_sub(code_offset))
.unwrap_or(std::usize::MAX)
};

View File

@ -167,7 +167,7 @@ const WHITELIST: &[Crate<'_>] = &[
Crate("termcolor"),
Crate("terminon"),
Crate("termion"),
Crate("term_size"),
Crate("termize"),
Crate("thread_local"),
Crate("ucd-util"),
Crate("unicode-normalization"),