Skip to content

Commit

Permalink
Upgrade outdated dependencies upon and yansi
Browse files Browse the repository at this point in the history
  • Loading branch information
rossmacarthur committed Apr 21, 2024
1 parent 653241c commit 269b24b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ once_cell = "1.12.0"
pretty_assertions = "1.3.0"
serde = { version = "1.0.136", features = ["derive"] }
serde_json = "1.0.79"
upon = "0.5.0"
yansi = "0.5.1"
upon = "0.8.1"
yansi = "1.0.1"
9 changes: 5 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ impl Goldie {
let expected = ENGINE
.compile(&contents)
.with_context(|| self.error("failed to compile golden file template"))?
.render(&ctx)
.render(&*ENGINE, &ctx)
.to_string()
.with_context(|| self.error("failed to render golden file template"))?;

pretty_assertions::assert_eq!(
Expand Down Expand Up @@ -264,12 +265,12 @@ impl Goldie {
}

fn error(&self, msg: &str) -> String {
use yansi::Color;
use yansi::Paint;
format!(
"\n\n{}: {}\nrun with {} to regenerate the golden file\n\n",
Color::Red.paint(msg),
msg.red(),
self.golden_file.display(),
Color::Blue.paint("GOLDIE_UPDATE=1").bold(),
"GOLDIE_UPDATE=1".blue().bold(),
)
}
}
Expand Down

0 comments on commit 269b24b

Please sign in to comment.