Skip to content

Commit

Permalink
Remove unused method finish
Browse files Browse the repository at this point in the history
  • Loading branch information
tirr-c committed Sep 19, 2024
1 parent 62d02da commit 2f366ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
10 changes: 2 additions & 8 deletions jxl/src/container/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ pub mod box_header;
pub mod parse;

use box_header::*;
use parse::*;
pub use parse::ParseEvent;
use parse::*;

/// Container format parser.
#[derive(Debug, Default)]
Expand All @@ -35,7 +35,6 @@ enum DetectState {
kind: BitstreamKind,
bytes_left: Option<usize>,
},
Done(BitstreamKind),
}

/// Structure of the decoded bitstream.
Expand Down Expand Up @@ -71,7 +70,7 @@ impl ContainerParser {
DetectState::WaitingBoxHeader
| DetectState::WaitingJxlpIndex(..)
| DetectState::InAuxBox { .. } => BitstreamKind::Container,
DetectState::InCodestream { kind, .. } | DetectState::Done(kind) => kind,
DetectState::InCodestream { kind, .. } => kind,
}
}

Expand All @@ -96,11 +95,6 @@ impl ContainerParser {
pub fn previous_consumed_bytes(&self) -> usize {
self.previous_consumed_bytes
}

pub fn finish(&mut self) {
// FIXME: validate state
self.state = DetectState::Done(self.kind());
}
}

#[cfg(test)]
Expand Down
3 changes: 1 addition & 2 deletions jxl/src/container/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//
// Originally written for jxl-oxide.

use super::{box_header::*, DetectState, JxlpIndexState, BitstreamKind, ContainerParser};
use super::{box_header::*, BitstreamKind, ContainerParser, DetectState, JxlpIndexState};
use crate::error::{Error, Result};

/// Iterator that reads over a buffer and emits parser events.
Expand Down Expand Up @@ -210,7 +210,6 @@ impl<'inner, 'buf> ParseEvents<'inner, 'buf> {
};
// FIXME: emit auxiliary box event
}
DetectState::Done(_) => return Ok(None),
}
}
}
Expand Down

0 comments on commit 2f366ce

Please sign in to comment.