Skip to content

Commit

Permalink
Fix to #463 (#466)
Browse files Browse the repository at this point in the history
Signed-off-by: Shaobo He <shaobohe@amazon.com>
  • Loading branch information
shaobo-he-aws authored Nov 5, 2024
1 parent 500e3b2 commit 4748ff0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cedar-drt/fuzz/src/schemas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,13 @@ impl<N: Clone + PartialEq + Debug + Display + TypeName + Ord> Equiv for json_sch
)
.map_err(|e| format!("memberOfTypes are not equal: {e}"))?;
Equiv::equiv(&lhs.shape, &rhs.shape).map_err(|e| format!("mismatched types: {e}"))?;
Equiv::equiv(&lhs.tags, &rhs.tags).map_err(|msg| format!("mismatched entity tags: {msg}"))
match (&lhs.tags, &rhs.tags) {
(Some(ts1), Some(ts2)) => {
Equiv::equiv(ts1, ts2).map_err(|msg| format!("mismatched entity tags: {msg}"))
}
(None, None) => Ok(()),
(Some(ts), None) | (None, Some(ts)) => Err(format!("only one side has tags: {ts}")),
}
}
}

Expand Down

0 comments on commit 4748ff0

Please sign in to comment.