Skip to content

Commit

Permalink
Remove unnecessary is_terminal dependency (#149)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Oakchris1955 authored Dec 10, 2023
1 parent cfe29cd commit e467ebb
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
strategy:
matrix:
os: ["ubuntu", "windows", "macos"]
version: ["stable", "beta", "1.63"]
version: ["stable", "beta", "1.70"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Unreleased
- Document crate MSRV of `1.70`.

# 2.0.4
- Switch from `winapi` to `windows-sys`.
Expand Down
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ homepage = "https://github.com/mackwic/colored"
repository = "https://github.com/mackwic/colored"
readme = "README.md"
keywords = ["color", "string", "term", "ansi_term", "term-painter"]
rust-version = "1.63"
rust-version = "1.70"

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

[dependencies]
is-terminal = "0.4"
lazy_static = "1"

[target.'cfg(windows)'.dependencies.windows-sys]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ providing a reference implementation, which greatly helped making this crate
output correct strings.

## Minimum Supported Rust Version (MSRV)
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`.
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`.

## License

Expand Down
3 changes: 1 addition & 2 deletions src/control.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
//! A couple of functions to enable and disable coloring.

use is_terminal::IsTerminal;
use std::default::Default;
use std::env;
use std::io;
use std::io::{self, IsTerminal};
use std::sync::atomic::{AtomicBool, Ordering};

/// Sets a flag to the console to use a virtual terminal environment.
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
//!
#![warn(missing_docs)]

extern crate is_terminal;
#[macro_use]
extern crate lazy_static;

Expand Down

0 comments on commit e467ebb

Please sign in to comment.