Skip to content

Commit

Permalink
Fixed clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ph0llux committed Dec 22, 2023
1 parent 43aac3b commit 340f444
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/io/zffwriter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ impl<R: Read> ZffWriter<R> {
match &self.extender_parameter {
None => File::create(&segment_filename)?,
Some(params) => {
let mut file = OpenOptions::new().append(true).write(true).read(true).open(&params.current_segment)?;
let mut file = OpenOptions::new().append(true).read(true).open(&params.current_segment)?;
//delete the last main footer
file.seek(SeekFrom::End(-8))?;
let footer_offset = u64::decode_directly(&mut file)?;
Expand Down Expand Up @@ -789,7 +789,7 @@ impl<R: Read> ZffWriter<R> {
},
};
segment_filename.set_extension(&file_extension);
let mut output_file = OpenOptions::new().write(true).append(true).open(&segment_filename)?;
let mut output_file = OpenOptions::new().append(true).open(&segment_filename)?;
output_file.write_all(&main_footer.encode_directly())?;

Ok(())
Expand Down

0 comments on commit 340f444

Please sign in to comment.