cargo fmt
This commit is contained in:
1 parent
fc0dafcde2
commit
907bbee576
2 files changed
+6
-6
No files matched your search
@@ -98,9 +98,9 @@ impl Image {
|
|||||||
let width = tag_reader.require_tag(Tag::ImageWidth)?.into_u32()?;
|
let width = tag_reader.require_tag(Tag::ImageWidth)?.into_u32()?;
|
||||||
let height = tag_reader.require_tag(Tag::ImageLength)?.into_u32()?;
|
let height = tag_reader.require_tag(Tag::ImageLength)?.into_u32()?;
|
||||||
if width == 0 || height == 0 {
|
if width == 0 || height == 0 {
|
||||||
return Err(TiffError::FormatError(
|
return Err(TiffError::FormatError(TiffFormatError::InvalidDimensions(
|
||||||
TiffFormatError::InvalidDimensions(width, height),
|
width, height,
|
||||||
));
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
let photometric_interpretation = tag_reader
|
let photometric_interpretation = tag_reader
|
||||||
|
|||||||
+3
-3
@@ -351,9 +351,9 @@ impl<'a, W: 'a + Write + Seek, T: ColorType, K: TiffKind, D: Compression>
|
|||||||
compression: D,
|
compression: D,
|
||||||
) -> TiffResult<Self> {
|
) -> TiffResult<Self> {
|
||||||
if width == 0 || height == 0 {
|
if width == 0 || height == 0 {
|
||||||
return Err(TiffError::FormatError(
|
return Err(TiffError::FormatError(TiffFormatError::InvalidDimensions(
|
||||||
TiffFormatError::InvalidDimensions(width, height),
|
width, height,
|
||||||
));
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
let row_samples = u64::from(width) * u64::try_from(<T>::BITS_PER_SAMPLE.len())?;
|
let row_samples = u64::from(width) * u64::try_from(<T>::BITS_PER_SAMPLE.len())?;
|
||||||
|
|||||||
Reference in new issue
Block a user