From 8040a044c351339b4f267b088eb08f066690da54 Mon Sep 17 00:00:00 2001 From: Chris Hennick <4961925+Pr0methean@users.noreply.github.com> Date: Wed, 1 May 2024 14:32:40 -0700 Subject: [PATCH] refactor: Make new method unsafe --- src/write.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/write.rs b/src/write.rs index f90e773e..675063eb 100644 --- a/src/write.rs +++ b/src/write.rs @@ -654,9 +654,9 @@ impl ZipWriter { /// Set the file length and crc32 manually. /// - /// WARNING: This overwrites the internal crc32 calculation. It should only be used in case + /// SAFETY: This overwrites the internal crc32 calculation. It should only be used in case /// the underlying [Write] is written independently and you need to adjust the zip metadata. - pub fn set_file_metadata(&mut self, length: u64, crc32: u32) -> ZipResult<()> { + pub unsafe fn set_file_metadata(&mut self, length: u64, crc32: u32) -> ZipResult<()> { if !self.writing_to_file { return Err(ZipError::Io(io::Error::new( io::ErrorKind::Other,