fix: remove Shared from public API

This commit is contained in:
Marli Frost 2022-03-20 19:01:43 +00:00
parent 25a5b4e4ba
commit de8a9c5998

View file

@ -38,7 +38,7 @@ mod ffi {
pub(crate) mod zip_archive { pub(crate) mod zip_archive {
/// Extract immutable data from `ZipArchive` to make it cheap to clone /// Extract immutable data from `ZipArchive` to make it cheap to clone
#[derive(Debug)] #[derive(Debug)]
pub struct Shared { pub(crate) struct Shared {
pub(super) files: Vec<super::ZipFileData>, pub(super) files: Vec<super::ZipFileData>,
pub(super) names_map: super::HashMap<String, usize>, pub(super) names_map: super::HashMap<String, usize>,
pub(super) offset: u64, pub(super) offset: u64,
@ -72,7 +72,7 @@ pub(crate) mod zip_archive {
} }
} }
pub use zip_archive::{Shared, ZipArchive}; pub use zip_archive::ZipArchive;
#[allow(clippy::large_enum_variant)] #[allow(clippy::large_enum_variant)]
enum CryptoReader<'a> { enum CryptoReader<'a> {
Plaintext(io::Take<&'a mut dyn Read>), Plaintext(io::Take<&'a mut dyn Read>),
@ -423,7 +423,7 @@ impl<R: Read + io::Seek> ZipArchive<R> {
files.push(file); files.push(file);
} }
let shared = Arc::new(Shared { let shared = Arc::new(zip_archive::Shared {
files, files,
names_map, names_map,
offset: archive_offset, offset: archive_offset,