diff options
author | Alexander Fougner <fougner89@gmail.com> | 2024-02-07 21:12:09 +0100 |
---|---|---|
committer | Alexander Fougner <fougner89@gmail.com> | 2024-02-07 21:27:35 +0100 |
commit | a95a25dc1d21ae50de150f8ea9a2d409415dbb3b (patch) | |
tree | ff913b6eb09d43699bca402c42cc07160357a982 /src/commands/cmd_mount.rs | |
parent | bc0a4438500a9962f6e326c376ebaaec1a230932 (diff) |
Replace atty with stdlib
is_terminal() is part of rust 1.70 std, no need for isatty
Signed-off-by: Alexander Fougner <fougner89@gmail.com>
Diffstat (limited to 'src/commands/cmd_mount.rs')
-rw-r--r-- | src/commands/cmd_mount.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commands/cmd_mount.rs b/src/commands/cmd_mount.rs index c845172d..eef7e1d6 100644 --- a/src/commands/cmd_mount.rs +++ b/src/commands/cmd_mount.rs @@ -1,8 +1,8 @@ -use atty::Stream; use bch_bindgen::{bcachefs, bcachefs::bch_sb_handle, opt_set}; use log::{info, debug, error, LevelFilter}; use clap::{Parser}; use uuid::Uuid; +use std::io::{stdout, IsTerminal}; use std::path::PathBuf; use crate::key; use crate::key::KeyLocation; @@ -150,7 +150,7 @@ pub struct Cli { options: String, /// Force color on/off. Default: autodetect tty - #[arg(short, long, action = clap::ArgAction::Set, default_value_t=atty::is(Stream::Stdout))] + #[arg(short, long, action = clap::ArgAction::Set, default_value_t=stdout().is_terminal())] colorize: bool, /// Verbose mode |