diff --git a/src/extra_fields/extended_timestamp.rs b/src/extra_fields/extended_timestamp.rs index 26f2943c..e5e3fb70 100644 --- a/src/extra_fields/extended_timestamp.rs +++ b/src/extra_fields/extended_timestamp.rs @@ -17,7 +17,7 @@ pub struct ExtendedTimestamp { impl ExtendedTimestamp { /// creates an extended timestamp struct by reading the required bytes from the reader. /// - /// This method assumes that the length has already been read, therefore + /// This method assumes that the length has already been read, therefore /// it must be passed as an argument pub fn try_from_reader(reader: &mut R, len: u16) -> ZipResult where diff --git a/src/extra_fields/mod.rs b/src/extra_fields/mod.rs index 9ccfdd6c..145cfade 100644 --- a/src/extra_fields/mod.rs +++ b/src/extra_fields/mod.rs @@ -23,7 +23,6 @@ pub use extended_timestamp::*; /// contains one extra field #[derive(Debug, Clone)] pub enum ExtraField { - /// extended timestamp, as described in - ExtendedTimestamp(ExtendedTimestamp) + ExtendedTimestamp(ExtendedTimestamp), } diff --git a/src/lib.rs b/src/lib.rs index b2ef9445..8ece3c20 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -39,13 +39,13 @@ mod aes_ctr; mod compression; mod cp437; mod crc32; +pub mod extra_fields; pub mod read; pub mod result; mod spec; mod types; pub mod write; mod zipcrypto; -pub mod extra_fields; pub use extra_fields::ExtraField; #[doc = "Unstable APIs\n\ diff --git a/src/read.rs b/src/read.rs index 3491b764..f76de446 100644 --- a/src/read.rs +++ b/src/read.rs @@ -30,7 +30,7 @@ use flate2::read::DeflateDecoder; use deflate64::Deflate64Decoder; #[cfg(feature = "bzip2")] -use bzip2::read::BzDecoder; +use bzip2_rs::decoder::DecoderReader; #[cfg(feature = "zstd")] use zstd::stream::read::Decoder as ZstdDecoder; @@ -146,7 +146,7 @@ pub(crate) enum ZipFileReader<'a> { #[cfg(feature = "deflate64")] Deflate64(Crc32Reader>>>), #[cfg(feature = "bzip2")] - Bzip2(Crc32Reader>>), + Bzip2(Crc32Reader>>), #[cfg(feature = "zstd")] Zstd(Crc32Reader>>>), #[cfg(feature = "lzma")] @@ -307,7 +307,7 @@ pub(crate) fn make_reader( } #[cfg(feature = "bzip2")] CompressionMethod::Bzip2 => { - let bzip2_reader = BzDecoder::new(reader); + let bzip2_reader = DecoderReader::new(reader); ZipFileReader::Bzip2(Crc32Reader::new(bzip2_reader, crc32, ae2_encrypted)) } #[cfg(feature = "zstd")] @@ -1102,7 +1102,7 @@ impl<'a> ZipFile<'a> { } /// iterate through all extra fields - pub fn extra_data_fields(&self) -> impl Iterator { + pub fn extra_data_fields(&self) -> impl Iterator { self.data.extra_fields.iter() } } diff --git a/tests/zip_extended_timestamp.rs b/tests/zip_extended_timestamp.rs index 9fecbacd..983e4fb5 100644 --- a/tests/zip_extended_timestamp.rs +++ b/tests/zip_extended_timestamp.rs @@ -13,7 +13,7 @@ fn test_extended_timestamp() { assert!(ts.ac_time().is_none()); assert!(ts.cr_time().is_none()); assert_eq!(*ts.mod_time().unwrap(), 1714635025); - }, + } } } }