Skip to content

Commit 21f1a97

Browse files
committed
review: add comment explaining the panic hook override in tests.
Signed-off-by: Piotr Sikora <[email protected]>
1 parent 17b8b75 commit 21f1a97

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/hostcalls.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1472,6 +1472,7 @@ mod utils {
14721472
// 0x80-0xff are invalid single-byte UTF-8 characters.
14731473
for i in 0x80..0xff {
14741474
let serialized_src: &[u8] = &[1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 99, 0, i, 0];
1475+
// Override panic to silence panic logs in the test output.
14751476
std::panic::set_hook(Box::new(|_| {}));
14761477
let result = std::panic::catch_unwind(|| {
14771478
deserialize_map(serialized_src);

0 commit comments

Comments
 (0)