Skip to content

Commit

Permalink
Merge pull request #371 from jongiddy/jgiddy/msrv-1.53
Browse files Browse the repository at this point in the history
Use explicit Default for GzHeaderState enum.

This resets the minimal required rust version to 1.53.
  • Loading branch information
Byron committed Aug 26, 2023
2 parents 1f7085d + 68ba8f6 commit 20cdcbe
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/gz/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,23 @@ impl GzHeader {
}
}

#[derive(Debug, Default)]
#[derive(Debug)]
pub enum GzHeaderState {
Start(u8, [u8; 10]),
Xlen(Option<Box<Crc>>, u8, [u8; 2]),
Extra(Option<Box<Crc>>, u16),
Filename(Option<Box<Crc>>),
Comment(Option<Box<Crc>>),
Crc(Option<Box<Crc>>, u8, [u8; 2]),
#[default]
Complete,
}

impl Default for GzHeaderState {
fn default() -> Self {
Self::Complete
}
}

#[derive(Debug, Default)]
pub struct GzHeaderParser {
state: GzHeaderState,
Expand Down

0 comments on commit 20cdcbe

Please sign in to comment.