aboutsummaryrefslogtreecommitdiff
path: root/src/zip/driver.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/zip/driver.rs')
-rw-r--r--src/zip/driver.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/zip/driver.rs b/src/zip/driver.rs
index 313bf8d..d575509 100644
--- a/src/zip/driver.rs
+++ b/src/zip/driver.rs
@@ -4,7 +4,7 @@ use crate::zip::structs::{EOCDR64Locator, CDR, EOCDR, EOCDR64};
4use crate::zip::ZipFile; 4use crate::zip::ZipFile;
5use std::collections::HashMap as Map; 5use std::collections::HashMap as Map;
6use std::fs::File; 6use std::fs::File;
7use std::io::{Cursor, Read, Seek, SeekFrom, Write}; 7use std::io::{Read, Seek, SeekFrom, Write};
8 8
9pub struct Zip<IO = File> { 9pub struct Zip<IO = File> {
10 io: IO, 10 io: IO,
@@ -43,7 +43,7 @@ impl<IO: Read + Seek> ArchiveRead for Zip<IO> {
43 }; 43 };
44 let eocdr: EOCDR = bincode::deserialize(&buf).map_err(|_| ZipError::InvalidEOCDR)?; 44 let eocdr: EOCDR = bincode::deserialize(&buf).map_err(|_| ZipError::InvalidEOCDR)?;
45 let comment = { 45 let comment = {
46 let mut buf = vec![0; eocdr.comment_len as usize]; 46 let mut buf: Vec<u8> = vec![0; eocdr.comment_len as usize];
47 io.read(&mut buf)?; 47 io.read(&mut buf)?;
48 String::from_utf8(buf).map_err(|_| ZipError::InvalidArchiveComment)? 48 String::from_utf8(buf).map_err(|_| ZipError::InvalidArchiveComment)?
49 }; 49 };