From 6281360f10c74a964c031afcf5c5a57adf413b9d Mon Sep 17 00:00:00 2001 From: ruffson Date: Sat, 26 Sep 2020 18:45:58 +0200 Subject: [PATCH] Fix error case --- src/decoder/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/decoder/mod.rs b/src/decoder/mod.rs index 9c95bc5..4cc1bd7 100644 --- a/src/decoder/mod.rs +++ b/src/decoder/mod.rs @@ -950,9 +950,9 @@ impl Decoder { ))); } if offsets.len() != bytes.len() { - return Err(TiffError::FormatError(TiffFormatError::Format( - String::from("Size mismatch of StripOffsets and StripByteCounts"), - ))); + return Err(TiffError::FormatError( + TiffFormatError::InconsistentSizesEncountered, + )); } let mut res_img = Vec::with_capacity(offsets[0] as usize);