From 0b2408bda19fb471665923df241fe1ef59b65dbf Mon Sep 17 00:00:00 2001 From: Robert Garrett Date: Mon, 13 Oct 2025 08:33:29 -0500 Subject: [PATCH] Fix test: panic when decoded data is wrong size This started life as a dev utility so I was only printing the message. Now that it's a `#[test]`, I'll have it panic on the error path. --- tests/codec.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/codec.rs b/tests/codec.rs index 4e6383d..af846f8 100644 --- a/tests/codec.rs +++ b/tests/codec.rs @@ -62,7 +62,7 @@ fn decode_qoi_samples() -> Result<(), TestError> { let data: Vec = PixelIterExpander::try_new(decoder).unwrap().collect(); let result = writer.write_image_data(&data); if let Err(res) = result { - eprintln!("{}", res); + panic!("{}", res); } return Ok(()) }