Skip to content

Commit

Permalink
Merge pull request #207 from epage/update
Browse files Browse the repository at this point in the history
chore: Update anstyle
  • Loading branch information
epage authored Apr 13, 2023
2 parents 79230d3 + 7bd65ea commit 23f33c0
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 46 deletions.
140 changes: 103 additions & 37 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 @@ -66,7 +66,7 @@ required-features = ["schema"]

[dependencies]
snapbox = { path = "crates/snapbox", version = "0.4.10", default-features = false, features = ["cmd"] }
anstream = { version = "0.2.1", optional = true }
anstream = { version = "0.3.0", optional = true }

glob = "0.3.0"
rayon = "1.5.1"
Expand Down
2 changes: 1 addition & 1 deletion crates/snapbox-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ color = ["dep:anstream"]
debug = []

[dependencies]
anstream = { version = "0.2.1", optional = true }
anstream = { version = "0.3.0", optional = true }
4 changes: 2 additions & 2 deletions crates/snapbox/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ backtrace = { version = "0.3", optional = true }

similar = { version = "2.1.0", features = ["inline"], optional = true }

anstyle = "0.3.1"
anstream = { version = "0.2.1", optional = true }
anstyle = "1.0.0"
anstream = { version = "0.3.0", optional = true }

document-features = { version = "0.2.6", optional = true }

Expand Down
10 changes: 5 additions & 5 deletions crates/snapbox/src/report/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ impl Palette {
pub fn color() -> Self {
if cfg!(feature = "color") {
Self {
info: anstyle::AnsiColor::Green.into(),
warn: anstyle::AnsiColor::Yellow.into(),
error: anstyle::AnsiColor::Red.into(),
info: anstyle::AnsiColor::Green.on_default(),
warn: anstyle::AnsiColor::Yellow.on_default(),
error: anstyle::AnsiColor::Red.on_default(),
hint: anstyle::Effects::DIMMED.into(),
expected: anstyle::AnsiColor::Green | anstyle::Effects::UNDERLINE,
actual: anstyle::AnsiColor::Red | anstyle::Effects::UNDERLINE,
expected: anstyle::AnsiColor::Green.on_default() | anstyle::Effects::UNDERLINE,
actual: anstyle::AnsiColor::Red.on_default() | anstyle::Effects::UNDERLINE,
}
} else {
Self::plain()
Expand Down

0 comments on commit 23f33c0

Please sign in to comment.