Change an error that should never happen to Option::expect.
This commit is contained in:
parent
a5d8a3e618
commit
37001e4cba
|
@ -77,8 +77,7 @@ fn get_exif_attr_sub<R>(reader: &mut R)
|
|||
}
|
||||
if size % 2 != 0 && file_size > 0 {
|
||||
file_size -= 1;
|
||||
size = size.checked_add(1)
|
||||
.ok_or(Error::InvalidFormat("Chunk size too big"))?;
|
||||
size = size.checked_add(1).expect("ex-file_size - size > 0");
|
||||
}
|
||||
reader.discard_exact(size as usize)?;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue