Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Commit

Permalink
decoder: Mark some unused functions as dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
etemesi254 committed Jun 20, 2022
1 parent 1150b3b commit c657cf0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ impl Decoder
if last_byte == 0xFF
{
let marker = Marker::from_u8(m);

if let Some(n) = marker
{
self.parse_marker_inner(n, buf)?;
Expand Down Expand Up @@ -338,7 +337,7 @@ impl Decoder
return Err(DecodeErrors::Format("Unsupported image format".to_string()));
}
// APP(0) segment
Marker::APP(_) =>
Marker::APP(0 | 1) =>
{
parse_app(buf, m, &mut self.info)?;
}
Expand All @@ -361,6 +360,7 @@ impl Decoder
// what follows is the image data
return Ok(());
}
Marker::EOI => return Err(DecodeErrors::Format("Premature End of image".to_string())),

Marker::DAC | Marker::DNL =>
{
Expand Down Expand Up @@ -698,7 +698,7 @@ impl ImageInfo
/// Set image x-density(dots per pixel)
///
/// Found in the APP(0) marker

#[allow(dead_code)]
pub(crate) fn set_x(&mut self, sample: u16)
{
self.x_density = sample;
Expand All @@ -707,7 +707,7 @@ impl ImageInfo
/// Set image y-density
///
/// Found in the APP(0) marker

#[allow(dead_code)]
pub(crate) fn set_y(&mut self, sample: u16)
{
self.y_density = sample;
Expand Down

0 comments on commit c657cf0

Please sign in to comment.