Skip to content

Commit 73c6e05

Browse files
authored
Merge pull request #787 from epage/poly
refactor(debug): Don't pull in is-terminal when its not needed
2 parents a2eed30 + 7d8f748 commit 73c6e05

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,15 @@ default = ["std"]
127127
alloc = []
128128
std = ["alloc", "memchr?/std"]
129129
simd = ["dep:memchr"]
130-
debug = ["std", "dep:anstream", "dep:anstyle", "dep:is-terminal", "dep:terminal_size"]
130+
debug = ["std", "dep:anstream", "dep:anstyle", "dep:is_terminal_polyfill", "dep:terminal_size"]
131131
unstable-recover = []
132132

133133
unstable-doc = ["alloc", "std", "simd", "unstable-recover"]
134134

135135
[dependencies]
136136
anstream = { version = "0.3.2", optional = true }
137137
anstyle = { version = "1.0.1", optional = true }
138-
is-terminal = { version = "0.4.9", optional = true }
138+
is_terminal_polyfill = { version = "1.48.0", optional = true }
139139
memchr = { version = "2.5", optional = true, default-features = false }
140140
terminal_size = { version = "0.4.0", optional = true }
141141

src/combinator/debug/internals.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ fn term_width() -> usize {
289289
}
290290

291291
fn query_width() -> Option<usize> {
292-
use is_terminal::IsTerminal;
292+
use is_terminal_polyfill::IsTerminal;
293293
if std::io::stderr().is_terminal() {
294294
terminal_size::terminal_size().map(|(w, _h)| w.0.into())
295295
} else {

0 commit comments

Comments
 (0)