Skip to content

Commit

Permalink
feat: replace ansi-term with ansiterm.
Browse files Browse the repository at this point in the history
One is maintained, the other one is not.
  • Loading branch information
Byron committed Dec 7, 2023
1 parent 942f0b9 commit 5533fe6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions crosstermion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ include = ["src/**/*", "LICENSE.md", "README.md", "CHANGELOG.md"]
[features]
default = []

color = ["ansi_term"]
color = ["ansiterm"]

input-async = ["futures-channel", "async-channel", "futures-lite", "futures-core" ]
input-async-crossterm = ["crossterm/event-stream", "input-async"]
Expand All @@ -35,7 +35,7 @@ futures-core = { version = "0.3.5", optional = true, default-features = false }
futures-lite = { version = "2.1.0", optional = true }
tui = { package = "ratatui", version = "0.24.0", optional = true, default-features = false }
tui-react = { version = "^0.21.0", optional = true, default-features = false, path = "../tui-react" }
ansi_term = { version = "0.12.1", optional = true, default-features = false }
ansiterm = { version = "0.12.2", optional = true, default-features = false }
async-channel = { version = "2.1.1", optional = true }

[target."cfg(windows)".dependencies]
Expand Down
6 changes: 3 additions & 3 deletions crosstermion/src/color.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use std::borrow::Cow;
use std::ffi::OsStr;

#[cfg(feature = "ansi_term")]
#[cfg(feature = "ansiterm")]
mod _impl {
use ansi_term::{ANSIGenericString, Style};
use ansiterm::{ANSIGenericString, Style};

pub struct Brush {
may_paint: bool,
Expand Down Expand Up @@ -40,7 +40,7 @@ mod _impl {
}
}

#[cfg(feature = "ansi_term")]
#[cfg(feature = "ansiterm")]
pub use _impl::*;

/// Return true if we should colorize the output, based on [clicolors spec](https://bixense.com/clicolors/) and [no-color spec](https://no-color.org)
Expand Down
4 changes: 2 additions & 2 deletions crosstermion/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ pub mod cursor;
pub mod color;

// Reexports
#[cfg(feature = "ansi_term")]
pub use ansi_term;
#[cfg(feature = "ansiterm")]
pub use ansiterm as ansi_term;
#[cfg(feature = "crossterm")]
pub use crossterm;
#[cfg(feature = "termion")]
Expand Down

0 comments on commit 5533fe6

Please sign in to comment.