Skip to content

Commit

Permalink
use anyhow context
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Rohde <[email protected]>
  • Loading branch information
ChrisRega and rohdealx committed Feb 27, 2024
1 parent e52d50d commit e1e33c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ fn main() -> Result<(), vg_errortools::MainError> {
actual,
config,
} => {
let config: ComparisonMode = serde_json::from_str(&config)
.map_err(|e| format!("Couldn't deserialize the config string: {e}"))
.unwrap();
use anyhow::Context;
let config: ComparisonMode =
serde_json::from_str(&config).context("Couldn't deserialize the config string")?;
let result = compare_files(nominal, actual, &config);
info!("Diff results: {result:#?}");
if result.is_error {
Expand Down

0 comments on commit e1e33c2

Please sign in to comment.