diff --git a/src/decoder/image.rs b/src/decoder/image.rs index 61952a4..544ec7b 100644 --- a/src/decoder/image.rs +++ b/src/decoder/image.rs @@ -98,7 +98,9 @@ impl Image { let width = tag_reader.require_tag(Tag::ImageWidth)?.into_u32()?; let height = tag_reader.require_tag(Tag::ImageLength)?.into_u32()?; if width == 0 || height == 0 { - return Err(TiffError::FormatError(TiffFormatError::InconsistentSizesEncountered)); + return Err(TiffError::FormatError( + TiffFormatError::InconsistentSizesEncountered, + )); } let photometric_interpretation = tag_reader diff --git a/src/encoder/mod.rs b/src/encoder/mod.rs index db6fa75..3547596 100644 --- a/src/encoder/mod.rs +++ b/src/encoder/mod.rs @@ -12,7 +12,8 @@ use std::{ use crate::{ error::TiffResult, - tags::{CompressionMethod, ResolutionUnit, Tag}, TiffError, TiffFormatError, + tags::{CompressionMethod, ResolutionUnit, Tag}, + TiffError, TiffFormatError, }; pub mod colortype; @@ -350,7 +351,9 @@ impl<'a, W: 'a + Write + Seek, T: ColorType, K: TiffKind, D: Compression> compression: D, ) -> TiffResult { if width == 0 || height == 0 { - return Err(TiffError::FormatError(TiffFormatError::InconsistentSizesEncountered)); + return Err(TiffError::FormatError( + TiffFormatError::InconsistentSizesEncountered, + )); } let row_samples = u64::from(width) * u64::try_from(::BITS_PER_SAMPLE.len())?;