Skip to content

Commit 0a9592c

Browse files
committed
remove atty
1 parent 76b445b commit 0a9592c

4 files changed

Lines changed: 3 additions & 47 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,3 @@ include_dir = "0.7.4"
4747
toml_edit = "0.22.23"
4848
itertools = "0.14.0"
4949
clap = { version = "4.5.39", features = ["derive", "wrap_help"] }
50-
atty = "0.2"

crates/emmylua_check/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,3 @@ walkdir.workspace = true
2626
tokio.workspace = true
2727
tokio-util.workspace = true
2828
clap.workspace = true
29-
atty.workspace = true

crates/emmylua_check/src/terminal_display/display.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use std::path::PathBuf;
2+
use std::io::IsTerminal;
23

34
use emmylua_code_analysis::{DbIndex, FileId, LuaDocument};
45
use lsp_types::{Diagnostic, DiagnosticSeverity};
@@ -11,7 +12,7 @@ pub struct TerminalDisplay {
1112

1213
impl TerminalDisplay {
1314
pub fn new(workspace: PathBuf) -> Self {
14-
let supports_color = atty::is(atty::Stream::Stdout);
15+
let supports_color = std::io::stdout().is_terminal();
1516

1617
Self {
1718
workspace,

0 commit comments

Comments
 (0)