Reformat
This commit is contained in:
parent
9efec6b61f
commit
82cd28af3c
1 changed files with 6 additions and 5 deletions
11
src/write.rs
11
src/write.rs
|
@ -475,7 +475,11 @@ impl<W: Write + Seek> ZipWriter<W> {
|
||||||
self.stats.hasher = Hasher::new();
|
self.stats.hasher = Hasher::new();
|
||||||
}
|
}
|
||||||
if let Some(keys) = options.encrypt_with {
|
if let Some(keys) = options.encrypt_with {
|
||||||
let mut zipwriter = crate::zipcrypto::ZipCryptoWriter { writer: mem::replace(&mut self.inner, Closed).unwrap(), buffer: vec![], keys };
|
let mut zipwriter = crate::zipcrypto::ZipCryptoWriter {
|
||||||
|
writer: mem::replace(&mut self.inner, Closed).unwrap(),
|
||||||
|
buffer: vec![],
|
||||||
|
keys,
|
||||||
|
};
|
||||||
let crypto_header = [0u8; 12];
|
let crypto_header = [0u8; 12];
|
||||||
|
|
||||||
zipwriter.write_all(&crypto_header)?;
|
zipwriter.write_all(&crypto_header)?;
|
||||||
|
@ -1115,10 +1119,7 @@ impl<W: Write + Seek> GenericZipWriter<W> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn switch_to(
|
fn switch_to(&mut self, make_new_self: SwitchWriterFunction<W>) -> ZipResult<()> {
|
||||||
&mut self,
|
|
||||||
make_new_self: SwitchWriterFunction<W>,
|
|
||||||
) -> ZipResult<()> {
|
|
||||||
let bare = match mem::replace(self, Closed) {
|
let bare = match mem::replace(self, Closed) {
|
||||||
Storer(w) => w,
|
Storer(w) => w,
|
||||||
#[cfg(any(
|
#[cfg(any(
|
||||||
|
|
Loading…
Add table
Reference in a new issue