Skip to content

Commit 5e11970

Browse files
chore: replace unmaintained ansi_term crate with nu_ansi_term crate. (#52)
1 parent b1a184f commit 5e11970

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ readme = "README.md"
1111
[dependencies]
1212
tracing-core = "0.1"
1313
tracing-subscriber = { version = "0.3", default-features = false, features = ["registry", "fmt", "std"] }
14-
ansi_term = "0.12"
14+
nu-ansi-term = "0.46.0"
1515
atty = "0.2"
1616
tracing-log = { version = "0.1", optional = true }
1717

src/format.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use ansi_term::Color;
1+
use nu_ansi_term::Color;
22
use std::{
33
fmt::{self, Write as _},
44
io,
@@ -251,7 +251,7 @@ impl<'a> fmt::Display for ColorLevel<'a> {
251251
Level::TRACE => Color::Purple.bold().paint("TRACE"),
252252
Level::DEBUG => Color::Blue.bold().paint("DEBUG"),
253253
Level::INFO => Color::Green.bold().paint(" INFO"),
254-
Level::WARN => Color::RGB(252, 234, 160).bold().paint(" WARN"), // orange
254+
Level::WARN => Color::Rgb(252, 234, 160).bold().paint(" WARN"), // orange
255255
Level::ERROR => Color::Red.bold().paint("ERROR"),
256256
}
257257
.fmt(f)

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
pub(crate) mod format;
22

3-
use ansi_term::{Color, Style};
43
use format::{Buffers, ColorLevel, Config, FmtEvent, SpanMode};
4+
use nu_ansi_term::{Color, Style};
55
use std::{
66
fmt::{self, Write as _},
77
io,

0 commit comments

Comments
 (0)