mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-12 10:00:50 -04:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user