Skip to content

Commit 7df9f87

Browse files
committed
Replace unmaintained atty crate
1 parent 7658d2b commit 7df9f87

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

surface-dtx-daemon/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ mod service;
1313
use service::Service;
1414

1515

16-
use std::{sync::{Arc, Mutex}, path::PathBuf};
16+
use std::{sync::{Arc, Mutex}, path::PathBuf, io::IsTerminal};
1717

1818
use anyhow::{Context, Result};
1919

@@ -48,7 +48,7 @@ fn bootstrap() -> Result<Config> {
4848
let subscriber = tracing_subscriber::fmt()
4949
.fmt_fields(fmt)
5050
.with_env_filter(filter)
51-
.with_ansi(atty::is(atty::Stream::Stdout));
51+
.with_ansi(std::io::stdout().is_terminal());
5252

5353
if matches.get_flag("no-log-time") {
5454
subscriber.without_time().init();

surface-dtx-userd/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ mod config;
33
mod logic;
44
mod utils;
55

6-
use std::path::PathBuf;
6+
use std::{path::PathBuf, io::IsTerminal};
77

88
use crate::config::Config;
99

@@ -32,7 +32,7 @@ fn bootstrap() -> Result<Config> {
3232
let subscriber = tracing_subscriber::fmt()
3333
.fmt_fields(fmt)
3434
.with_env_filter(filter)
35-
.with_ansi(atty::is(atty::Stream::Stdout));
35+
.with_ansi(std::io::stdout().is_terminal());
3636

3737
if matches.get_flag("no-log-time") {
3838
subscriber.without_time().init();

0 commit comments

Comments
 (0)