Skip to content

Commit e467ebb

Browse files
authored
Remove unnecessary is_terminal dependency (#149)
* Remove unnecessary dependency Replaced the IsTerminal trait from the is_terminal crate with the built-in IO IsTerminal, which is stabilized since rustc 1.70.0 * Update test overflow Change minimum required Rust version to 1.70 * Update README and CHANGELOG
1 parent cfe29cd commit e467ebb

File tree

6 files changed

+5
-7
lines changed

6 files changed

+5
-7
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
strategy:
3939
matrix:
4040
os: ["ubuntu", "windows", "macos"]
41-
version: ["stable", "beta", "1.63"]
41+
version: ["stable", "beta", "1.70"]
4242
steps:
4343
- name: Checkout repository
4444
uses: actions/checkout@v3

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Unreleased
2+
- Document crate MSRV of `1.70`.
23

34
# 2.0.4
45
- Switch from `winapi` to `windows-sys`.

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@ homepage = "https://github.com/mackwic/colored"
99
repository = "https://github.com/mackwic/colored"
1010
readme = "README.md"
1111
keywords = ["color", "string", "term", "ansi_term", "term-painter"]
12-
rust-version = "1.63"
12+
rust-version = "1.70"
1313

1414
[features]
1515
# with this feature, no color will ever be written
1616
no-color = []
1717

1818
[dependencies]
19-
is-terminal = "0.4"
2019
lazy_static = "1"
2120

2221
[target.'cfg(windows)'.dependencies.windows-sys]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ providing a reference implementation, which greatly helped making this crate
140140
output correct strings.
141141

142142
## Minimum Supported Rust Version (MSRV)
143-
The current MSRV is `1.63`, which is checked and enforced automatically via CI. This version may change in the future in minor version bumps, so if you require a specific Rust version you should use a restricted version requirement such as `~X.Y`.
143+
The current MSRV is `1.70`, which is checked and enforced automatically via CI. This version may change in the future in minor version bumps, so if you require a specific Rust version you should use a restricted version requirement such as `~X.Y`.
144144

145145
## License
146146

src/control.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
//! A couple of functions to enable and disable coloring.
22
3-
use is_terminal::IsTerminal;
43
use std::default::Default;
54
use std::env;
6-
use std::io;
5+
use std::io::{self, IsTerminal};
76
use std::sync::atomic::{AtomicBool, Ordering};
87

98
/// Sets a flag to the console to use a virtual terminal environment.

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
//!
2626
#![warn(missing_docs)]
2727

28-
extern crate is_terminal;
2928
#[macro_use]
3029
extern crate lazy_static;
3130

0 commit comments

Comments
 (0)