Add assertions for state flags in finish_file
This commit is contained in:
parent
ea25dbd954
commit
697578b38d
1 changed files with 2 additions and 0 deletions
|
@ -468,6 +468,8 @@ impl<W: Write + Seek> ZipWriter<W> {
|
|||
|
||||
fn finish_file(&mut self) -> ZipResult<()> {
|
||||
if !self.writing_to_file {
|
||||
debug_assert!(!self.writing_raw);
|
||||
debug_assert!(!self.writing_to_extra_field);
|
||||
return Ok(());
|
||||
}
|
||||
if self.writing_to_extra_field {
|
||||
|
|
Loading…
Add table
Reference in a new issue