refactor: Make new method unsafe
This commit is contained in:
parent
69e7397011
commit
8040a044c3
1 changed files with 2 additions and 2 deletions
|
@ -654,9 +654,9 @@ impl<W: Write + Seek> ZipWriter<W> {
|
|||
|
||||
/// 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,
|
||||
|
|
Loading…
Add table
Reference in a new issue