Skip to content

Commit

Permalink
Fix clippy error
Browse files Browse the repository at this point in the history
  • Loading branch information
Pr0methean committed Feb 28, 2024
1 parent 3367c61 commit bcc5a91
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions src/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1274,11 +1274,9 @@ impl<W: Write + Seek> GenericZipWriter<W> {
unreachable!()
}
#[cfg(feature = "deflate64")]
CompressionMethod::Deflate64 => {
Err(ZipError::UnsupportedArchive(
"Compressing Deflate64 is not supported",
))
}
CompressionMethod::Deflate64 => Err(ZipError::UnsupportedArchive(
"Compressing Deflate64 is not supported",
)),
#[cfg(feature = "bzip2")]
CompressionMethod::Bzip2 => {
let level = clamp_opt(
Expand Down Expand Up @@ -1634,6 +1632,15 @@ fn path_to_string(path: &std::path::Path) -> String {
path_str
}

#[cfg(not(feature = "unreserved"))]
const EXTRA_FIELD_MAPPING: [u16; 49] = [
0x0001, 0x0007, 0x0008, 0x0009, 0x000a, 0x000c, 0x000d, 0x000e, 0x000f, 0x0014, 0x0015, 0x0016,
0x0017, 0x0018, 0x0019, 0x0020, 0x0021, 0x0022, 0x0023, 0x0065, 0x0066, 0x4690, 0x07c8, 0x2605,
0x2705, 0x2805, 0x334d, 0x4341, 0x4453, 0x4704, 0x470f, 0x4b46, 0x4c41, 0x4d49, 0x4f4c, 0x5356,
0x5455, 0x554e, 0x5855, 0x6375, 0x6542, 0x7075, 0x756e, 0x7855, 0xa11e, 0xa220, 0xfd4a, 0x9901,
0x9902,
];

#[cfg(test)]
mod test {
use super::{FileOptions, ZipWriter};
Expand Down Expand Up @@ -2080,12 +2087,3 @@ mod test {
Ok(())
}
}

#[cfg(not(feature = "unreserved"))]
const EXTRA_FIELD_MAPPING: [u16; 49] = [
0x0001, 0x0007, 0x0008, 0x0009, 0x000a, 0x000c, 0x000d, 0x000e, 0x000f, 0x0014, 0x0015, 0x0016,
0x0017, 0x0018, 0x0019, 0x0020, 0x0021, 0x0022, 0x0023, 0x0065, 0x0066, 0x4690, 0x07c8, 0x2605,
0x2705, 0x2805, 0x334d, 0x4341, 0x4453, 0x4704, 0x470f, 0x4b46, 0x4c41, 0x4d49, 0x4f4c, 0x5356,
0x5455, 0x554e, 0x5855, 0x6375, 0x6542, 0x7075, 0x756e, 0x7855, 0xa11e, 0xa220, 0xfd4a, 0x9901,
0x9902,
];

0 comments on commit bcc5a91

Please sign in to comment.