Skip to content

Commit

Permalink
Migrote jsonschema changes
Browse files Browse the repository at this point in the history
  • Loading branch information
aborgna-q committed Oct 29, 2024
1 parent 201eaa9 commit 12c3746
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hugr-core/src/hugr/serialize/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ impl NamedSchema {
}

pub fn check(&self, val: &serde_json::Value) {
if let Err(errors) = self.schema.validate(val) {
let mut errors = self.schema.iter_errors(val).peekable();
if errors.peek().is_some() {
// errors don't necessarily implement Debug
eprintln!("Schema failed to validate: {}", self.name);
for error in errors {
Expand Down

0 comments on commit 12c3746

Please sign in to comment.