fix(sdk): Replace assert! by debug_assert!.

This patch replaces a call to `assert_eq` and `assert` by
`debug_assert_eq` and `debug_assert`. We don't want to panic in
production :-].
This commit is contained in:
Ivan Enderlin
2025-03-12 15:38:25 +01:00
parent 3c694e7909
commit 6f370daaed

View File

@@ -1210,8 +1210,8 @@ mod private {
let diff_updates = self.events.updates_as_vector_diffs();
// Ensure the contract defined in the doc comment is true:
assert_eq!(diff_updates.len(), 1);
assert!(matches!(diff_updates[0], VectorDiff::Clear));
debug_assert_eq!(diff_updates.len(), 1);
debug_assert!(matches!(diff_updates[0], VectorDiff::Clear));
Ok(diff_updates)
}