From 55d82a455cbe2b3bd10ecc1ffa92c07a9ac52302 Mon Sep 17 00:00:00 2001 From: Chris Hennick Date: Thu, 4 May 2023 10:47:33 -0700 Subject: [PATCH] Refactor: rename prepare_switch_to to prepare_next_writer --- src/write.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/write.rs b/src/write.rs index 263e0232..cd7aef7d 100644 --- a/src/write.rs +++ b/src/write.rs @@ -471,7 +471,7 @@ impl ZipWriter { } let make_plain_writer = self .inner - .prepare_switch_to(CompressionMethod::Stored, None)?; + .prepare_next_writer(CompressionMethod::Stored, None)?; self.inner.switch_to(make_plain_writer)?; let writer = self.inner.get_plain(); @@ -503,7 +503,7 @@ impl ZipWriter { self.files_by_name.remove(&last_file.file_name); let make_plain_writer = self .inner - .prepare_switch_to(CompressionMethod::Stored, None)?; + .prepare_next_writer(CompressionMethod::Stored, None)?; self.inner.switch_to(make_plain_writer)?; self.inner .get_plain() @@ -524,7 +524,7 @@ impl ZipWriter { Self::normalize_options(&mut options); let make_new_self = self .inner - .prepare_switch_to(options.compression_method, options.compression_level)?; + .prepare_next_writer(options.compression_method, options.compression_level)?; self.start_entry(name, options, None)?; self.inner.switch_to(make_new_self)?; self.writing_to_file = true; @@ -695,7 +695,7 @@ impl ZipWriter { let make_compressing_writer = match self .inner - .prepare_switch_to(file.compression_method, file.compression_level) + .prepare_next_writer(file.compression_method, file.compression_level) { Ok(writer) => writer, Err(e) => { @@ -988,7 +988,7 @@ impl Drop for ZipWriter { } impl GenericZipWriter { - fn prepare_switch_to( + fn prepare_next_writer( &mut self, compression: CompressionMethod, compression_level: Option,