Skip to content

Commit

Permalink
Implement default manually for 1.61 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
spoutn1k committed Aug 19, 2024
1 parent ef80908 commit 9508118
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/encoder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,20 @@ use self::writer::*;
pub type Predictor = crate::tags::Predictor;
pub type DeflateLevel = compression::DeflateLevel;

#[derive(Default, Clone, Copy, PartialEq)]
#[derive(Clone, Copy, PartialEq)]
pub enum Compression {
#[default]
Uncompressed,
Lzw,
Deflate(DeflateLevel),
Packbits,
}

impl Default for Compression {
fn default() -> Self {
Self::Uncompressed
}
}

impl Compression {
fn tag(&self) -> CompressionMethod {
match self {
Expand Down

0 comments on commit 9508118

Please sign in to comment.