Skip to content

Commit 5bc198b

Browse files
authored
Replace 'ansi_term' dev-dependency with 'ansiterm' (#209)
1 parent a21367d commit 5bc198b

2 files changed

Lines changed: 21 additions & 21 deletions

File tree

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ license = "MPL-2.0"
88
homepage = "https://github.com/mackwic/colored"
99
repository = "https://github.com/mackwic/colored"
1010
readme = "README.md"
11-
keywords = ["color", "string", "term", "ansi_term", "term-painter"]
11+
keywords = ["color", "string", "term", "ansiterm", "ansi_term", "term-painter"]
1212
rust-version = "1.80"
1313

1414
[features]
@@ -21,7 +21,7 @@ version = ">=0.48,<=0.60"
2121
features = ["Win32_Foundation", "Win32_System_Console"]
2222

2323
[dev-dependencies]
24-
ansi_term = "0.12"
24+
ansiterm = "0.12"
2525
insta = "1"
2626
rspec = "1"
2727

tests/ansi_term_compat.rs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
#![cfg(not(feature = "no-color"))]
22
#![allow(unused_imports)]
33

4-
extern crate ansi_term;
4+
extern crate ansiterm;
55
extern crate colored;
66

7-
use ansi_term::*;
7+
use ansiterm::*;
88
use colored::*;
99

1010
macro_rules! test_simple_color {
11-
($string:expr, $colored_name:ident, $ansi_term_name:ident) => {
11+
($string:expr, $colored_name:ident, $ansiterm_name:ident) => {
1212
#[test]
1313
fn $colored_name() {
1414
let s = format!("{} {}", $string, stringify!($colored_name));
1515
assert_eq!(
1616
s.$colored_name().to_string(),
17-
Colour::$ansi_term_name.paint(s).to_string()
17+
Colour::$ansiterm_name.paint(s).to_string()
1818
)
1919
}
2020
};
2121
}
2222

2323
mod compat_colors {
24-
use super::ansi_term::*;
24+
use super::ansiterm::*;
2525
use super::colored::*;
2626

2727
test_simple_color!("test string", black, Black);
@@ -35,14 +35,14 @@ mod compat_colors {
3535
}
3636

3737
macro_rules! test_simple_style {
38-
($string:expr, $colored_style:ident, $ansi_term_style:ident) => {
38+
($string:expr, $colored_style:ident, $ansiterm_style:ident) => {
3939
#[test]
4040
fn $colored_style() {
4141
let s = format!("{} {}", $string, stringify!($colored_style));
4242
assert_eq!(
4343
s.$colored_style().to_string(),
44-
ansi_term::Style::new()
45-
.$ansi_term_style()
44+
ansiterm::Style::new()
45+
.$ansiterm_style()
4646
.paint(s)
4747
.to_string()
4848
)
@@ -51,8 +51,8 @@ macro_rules! test_simple_style {
5151
}
5252

5353
mod compat_styles {
54-
use super::ansi_term;
55-
use super::ansi_term::*;
54+
use super::ansiterm;
55+
use super::ansiterm::*;
5656
use super::colored;
5757
use super::colored::*;
5858

@@ -66,14 +66,14 @@ mod compat_styles {
6666
}
6767

6868
macro_rules! test_simple_bgcolor {
69-
($string:expr, $colored_name:ident, $ansi_term_name:ident) => {
69+
($string:expr, $colored_name:ident, $ansiterm_name:ident) => {
7070
#[test]
7171
fn $colored_name() {
7272
let s = format!("{} {}", $string, stringify!($colored_name));
7373
assert_eq!(
7474
s.$colored_name().to_string(),
75-
ansi_term::Style::default()
76-
.on(ansi_term::Colour::$ansi_term_name)
75+
ansiterm::Style::default()
76+
.on(ansiterm::Colour::$ansiterm_name)
7777
.paint(s)
7878
.to_string()
7979
)
@@ -82,8 +82,8 @@ macro_rules! test_simple_bgcolor {
8282
}
8383

8484
mod compat_bgcolors {
85-
use super::ansi_term;
86-
use super::ansi_term::*;
85+
use super::ansiterm;
86+
use super::ansiterm::*;
8787
use super::colored;
8888
use super::colored::*;
8989

@@ -98,8 +98,8 @@ mod compat_bgcolors {
9898
}
9999

100100
mod compat_complex {
101-
use super::ansi_term;
102-
use super::ansi_term::*;
101+
use super::ansiterm;
102+
use super::ansiterm::*;
103103
use super::colored;
104104
use super::colored::*;
105105

@@ -125,8 +125,8 @@ mod compat_complex {
125125
}
126126

127127
mod compat_overrides {
128-
use super::ansi_term;
129-
use super::ansi_term::*;
128+
use super::ansiterm;
129+
use super::ansiterm::*;
130130
use super::colored;
131131
use super::colored::*;
132132

0 commit comments

Comments
 (0)