Use termize instead of term_size
This commit is contained in:
parent
3761dcd346
commit
b0b11d31a2
12
Cargo.lock
12
Cargo.lock
@ -3540,8 +3540,8 @@ dependencies = [
|
|||||||
"rustc_data_structures",
|
"rustc_data_structures",
|
||||||
"rustc_span",
|
"rustc_span",
|
||||||
"serialize",
|
"serialize",
|
||||||
"term_size",
|
|
||||||
"termcolor",
|
"termcolor",
|
||||||
|
"termize",
|
||||||
"unicode-width",
|
"unicode-width",
|
||||||
"winapi 0.3.8",
|
"winapi 0.3.8",
|
||||||
]
|
]
|
||||||
@ -4580,6 +4580,16 @@ dependencies = [
|
|||||||
"redox_termios",
|
"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]]
|
[[package]]
|
||||||
name = "test"
|
name = "test"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
|
@ -18,7 +18,7 @@ unicode-width = "0.1.4"
|
|||||||
atty = "0.2"
|
atty = "0.2"
|
||||||
termcolor = "1.0"
|
termcolor = "1.0"
|
||||||
annotate-snippets = "0.6.1"
|
annotate-snippets = "0.6.1"
|
||||||
term_size = "0.3.1"
|
termize = "0.1.1"
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
winapi = { version = "0.3", features = ["handleapi", "synchapi", "winbase"] }
|
winapi = { version = "0.3", features = ["handleapi", "synchapi", "winbase"] }
|
||||||
|
@ -1366,7 +1366,7 @@ impl EmitterWriter {
|
|||||||
} else if self.ui_testing {
|
} else if self.ui_testing {
|
||||||
140
|
140
|
||||||
} else {
|
} else {
|
||||||
term_size::dimensions()
|
termize::dimensions()
|
||||||
.map(|(w, _)| w.saturating_sub(code_offset))
|
.map(|(w, _)| w.saturating_sub(code_offset))
|
||||||
.unwrap_or(std::usize::MAX)
|
.unwrap_or(std::usize::MAX)
|
||||||
};
|
};
|
||||||
|
@ -167,7 +167,7 @@ const WHITELIST: &[Crate<'_>] = &[
|
|||||||
Crate("termcolor"),
|
Crate("termcolor"),
|
||||||
Crate("terminon"),
|
Crate("terminon"),
|
||||||
Crate("termion"),
|
Crate("termion"),
|
||||||
Crate("term_size"),
|
Crate("termize"),
|
||||||
Crate("thread_local"),
|
Crate("thread_local"),
|
||||||
Crate("ucd-util"),
|
Crate("ucd-util"),
|
||||||
Crate("unicode-normalization"),
|
Crate("unicode-normalization"),
|
||||||
|
Loading…
Reference in New Issue
Block a user