Skip to content

Commit e293b0c

Browse files
Merge pull request #113 from muja/main
feat(rc-zip-sync): make EntryReader public
2 parents 10aafbb + 1db0a66 commit e293b0c

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

rc-zip-sync/src/entry_reader.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ use rc_zip::{
55
use std::io;
66
use tracing::trace;
77

8-
pub(crate) struct EntryReader<R>
8+
/// Reader for an entry inside an archive
9+
pub struct EntryReader<R>
910
where
1011
R: io::Read,
1112
{

rc-zip-sync/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ pub use streaming_entry_reader::StreamingEntryReader;
1515

1616
// re-exports
1717
pub use rc_zip;
18+
pub use entry_reader::EntryReader;
1819
pub use read_zip::{
1920
ArchiveHandle, EntryHandle, HasCursor, ReadZip, ReadZipStreaming, ReadZipWithSize,
2021
};

rc-zip-sync/src/read_zip.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ where
182182
F: HasCursor,
183183
{
184184
/// Returns a reader for the entry.
185-
pub fn reader(&self) -> impl Read + 'a {
185+
pub fn reader(&self) -> EntryReader<<F as HasCursor>::Cursor<'a>> {
186186
EntryReader::new(self.entry, self.file.cursor_at(self.entry.header_offset))
187187
}
188188

0 commit comments

Comments
 (0)