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,