Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove IsTty now that std::io::IsTerminal has stabalized. #794

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions examples/is_tty.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
use crossterm::{
execute,
terminal::{size, SetSize},
tty::IsTty,
};
use std::io::{stdin, stdout};
use std::io::{stdin, stdout, IsTerminal};

pub fn main() {
println!("{:?}", size().unwrap());
execute!(stdout(), SetSize(10, 10)).unwrap();
println!("{:?}", size().unwrap());

if stdin().is_tty() {
if stdin().is_terminal() {
println!("Is TTY");
} else {
println!("Is not TTY");
Expand Down
3 changes: 0 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,6 @@ pub mod style;
/// A module to work with the terminal.
pub mod terminal;

/// A module to query if the current instance is a tty.
pub mod tty;

#[cfg(windows)]
/// A module that exposes one function to check if the current terminal supports ANSI sequences.
pub mod ansi_support;
Expand Down
46 changes: 0 additions & 46 deletions src/tty.rs

This file was deleted.

Loading