Merge pull request #354 from Shnatsel/derive-debug

Derive useful traits on public types
This commit is contained in:
Aurelia Molzer authored and GitHub committed 2026-03-06 11:45:45 +00:00
commit c4ab46ad2c
2 files changed
+6 -8

No files matched your search

+2 -4
View File
@@ -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();
}
+4 -4
View File
@@ -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,