Skip to content

Commit 3f34acd

Browse files
chenxiaolongAndrew Gunnerson
andauthored
Add StreamWriter::into_inner() (#367)
This way, it's possible to retrieve the original writer after writing a file via ZipWriter::new_stream(). Signed-off-by: Andrew Gunnerson <[email protected]> Co-authored-by: Andrew Gunnerson <user@domain>
1 parent 44c0315 commit 3f34acd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/write.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2038,6 +2038,11 @@ impl<W: Write> StreamWriter<W> {
20382038
bytes_written: 0,
20392039
}
20402040
}
2041+
2042+
/// Consumes this wrapper, returning the underlying writer.
2043+
pub fn into_inner(self) -> W {
2044+
self.inner
2045+
}
20412046
}
20422047

20432048
impl<W: Write> Write for StreamWriter<W> {

0 commit comments

Comments
 (0)