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.
This commit is contained in:
@@ -62,7 +62,7 @@ fn decode_qoi_samples() -> Result<(), TestError> {
|
|||||||
let data: Vec<u8> = PixelIterExpander::try_new(decoder).unwrap().collect();
|
let data: Vec<u8> = PixelIterExpander::try_new(decoder).unwrap().collect();
|
||||||
let result = writer.write_image_data(&data);
|
let result = writer.write_image_data(&data);
|
||||||
if let Err(res) = result {
|
if let Err(res) = result {
|
||||||
eprintln!("{}", res);
|
panic!("{}", res);
|
||||||
}
|
}
|
||||||
return Ok(())
|
return Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user