diff --git a/src/encoder/mod.rs b/src/encoder/mod.rs index a7f4887..bdc9d61 100644 --- a/src/encoder/mod.rs +++ b/src/encoder/mod.rs @@ -40,7 +40,7 @@ use self::writer::*; pub type Predictor = crate::tags::Predictor; #[non_exhaustive] -#[derive(Clone, Copy, PartialEq, Default)] +#[derive(Debug, Clone, Copy, PartialEq, Default)] pub enum Compression { #[default] Uncompressed, @@ -836,9 +836,7 @@ impl<'a, W: 'a + Write + Seek, T: ColorType, K: TiffKind> ImageEncoder<'a, W, T, self.encoder .write_tag(Tag::ResolutionUnit, unit.to_u16()) .unwrap(); - self.encoder - .write_tag(Tag::XResolution, value.clone()) - .unwrap(); + self.encoder.write_tag(Tag::XResolution, value).unwrap(); self.encoder.write_tag(Tag::YResolution, value).unwrap(); } diff --git a/src/encoder/tiff_value.rs b/src/encoder/tiff_value.rs index 38eeac3..d8e9ecb 100644 --- a/src/encoder/tiff_value.rs +++ b/src/encoder/tiff_value.rs @@ -665,22 +665,22 @@ impl_tiff_value_for_contiguous_sequence!(Rational; 8; Type::RATIONAL); impl_tiff_value_for_contiguous_sequence!(SRational; 8; Type::SRATIONAL); /// Type to represent tiff values of type `IFD` -#[derive(Clone)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] pub struct Ifd(pub u32); /// Type to represent tiff values of type `IFD8` -#[derive(Clone)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] pub struct Ifd8(pub u64); /// Type to represent tiff values of type `RATIONAL` -#[derive(Clone)] +#[derive(Debug, Copy, Clone)] pub struct Rational { pub n: u32, pub d: u32, } /// Type to represent tiff values of type `SRATIONAL` -#[derive(Clone)] +#[derive(Debug, Copy, Clone)] pub struct SRational { pub n: i32, pub d: i32,