Add byte expected error and cleanup

This commit is contained in:
ruffson committed 2020-09-25 20:06:52 +02:00
1 parent 63f09b267a
commit 72474b569e
4 files changed
+6 -8

No files matched your search

+4
View File
@@ -45,6 +45,7 @@ pub enum TiffFormatError {
InvalidTagValueType(Tag),
RequiredTagNotFound(Tag),
UnknownPredictor(u16),
ByteExpected(Value),
UnsignedIntegerExpected(Value),
SignedIntegerExpected(Value),
InflateError(InflateError),
@@ -69,6 +70,9 @@ impl fmt::Display for TiffFormatError {
UnknownPredictor(ref predictor) => {
write!(fmt, "Unknown predictor “{}” encountered", predictor)
}
ByteExpected(ref val) => {
write!(fmt, "Expected byte, {:?} found.", val)
}
UnsignedIntegerExpected(ref val) => {
write!(fmt, "Expected unsigned integer, {:?} found.", val)
}