Skip to content

Commit

Permalink
fix(dependencies): move from nu_ansi_term to anstyle
Browse files Browse the repository at this point in the history
anstyle is also what is used in `clap`, so it makes sense to switch to
anstyle for coloring

Closes: #13
  • Loading branch information
b1rger committed Jul 28, 2023
1 parent bd913f8 commit 56bbd91
Show file tree
Hide file tree
Showing 7 changed files with 140 additions and 161 deletions.
109 changes: 17 additions & 92 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ categories = ["command-line-utilities", "date-and-time"]
anyhow = "1.0"
chrono = { version = "0.4", default-features = false, features = ["clock"] }
clap = { version = "4.0.0", features = ["derive", "cargo"] }
nu-ansi-term = "0.47"
toml = "0.5.*"
serde = { version = "1.0", features = ["derive"] }
xdg = "2.5.0"
ical = "0.8.*"
anstyle = "1.0.1"
8 changes: 7 additions & 1 deletion src/agenda.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ impl fmt::Display for Agenda<'_> {
)
});
for (event, style) in eventstuple {
ret += format!("{} {}\n", style.stylenames.to_style().paint("·"), event).as_str();
ret += format!(
"{}·{} {}\n",
style.stylenames.to_style().render(),
style.stylenames.to_style().render_reset(),
event
)
.as_str();
}
}
write!(f, "{}", ret)
Expand Down
Loading

0 comments on commit 56bbd91

Please sign in to comment.