Skip to content

Commit

Permalink
Remove atty dev dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
gyscos committed Jul 31, 2024
1 parent 9f9a985 commit 20a1ef4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cursive-core/src/printer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl<'a, 'b> Printer<'a, 'b> {
buffer,
current_style: Cell::new(ConcreteStyle {
color: ColorPair::terminal_default(),
effects: EnumSet::EMPTY,
effects: EnumSet::empty(),
}),
}
}
Expand Down
2 changes: 1 addition & 1 deletion cursive-core/src/style/style_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl ConcreteStyle {
/// Return a new concrete style that uses the terminal default colors.
pub const fn terminal_default() -> Self {
ConcreteStyle {
effects: EnumSet::EMPTY,
effects: EnumSet::empty(),
color: ColorPair::terminal_default(),
}
}
Expand Down
1 change: 0 additions & 1 deletion cursive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ required-features = ["builder"]

[dev-dependencies]
rand = "0.8"
atty = "0.2"
pretty-bytes = "0.2"
serde_json = "1.0.85"
serde_yaml = "0.9.13"
4 changes: 2 additions & 2 deletions cursive/examples/vpv.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::io;
use std::io::{self, IsTerminal};

use cursive::traits::{Resizable, With};
use cursive::utils;
Expand Down Expand Up @@ -80,7 +80,7 @@ fn main() {
.button("Abort", Cursive::quit),
);

if source.is_none() && atty::is(atty::Stream::Stdin) {
if source.is_none() && io::stdin().is_terminal() {
siv.add_layer(
Dialog::text(
"Please specify an input file or redirect a file to stdin.
Expand Down

0 comments on commit 20a1ef4

Please sign in to comment.