Skip to content

Commit

Permalink
chore: ci and exclude files
Browse files Browse the repository at this point in the history
  • Loading branch information
carlos-menezes committed Apr 7, 2024
1 parent 342a5a3 commit aacdbd2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "img-archive-parser"
version = "0.1.0"
edition = "2021"
exclude = ["tests/*"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl<B: Read + Seek> IMGArchive<B> {
}

pub fn extract<W: Write>(&mut self, entry: &Entry, writer: &mut W) -> std::io::Result<()> {
let current_pos = self.buffer.seek(SeekFrom::Current(0))?;
let current_pos = self.buffer.stream_position()?;

// Every file contained in the img archive must be sector aligned,
// where the size of each sector is 2048 bytes.
Expand All @@ -58,7 +58,7 @@ impl<B: Read + Seek> Iterator for IMGArchive<B> {
type Item = Result<Entry, Box<dyn std::error::Error>>;

fn next(&mut self) -> Option<Self::Item> {
let current_pos = match self.buffer.seek(SeekFrom::Current(0)) {
let current_pos = match self.buffer.stream_position() {
Ok(pos) => pos,
Err(e) => return Some(Err(e.into())),
};
Expand Down

0 comments on commit aacdbd2

Please sign in to comment.