Skip to content

Commit 96791ea

Browse files
authored
feat: add into_inner for csv writer (#3759)
1 parent d016403 commit 96791ea

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

arrow-csv/src/writer.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,12 @@ impl<W: Write> Writer<W> {
185185

186186
Ok(())
187187
}
188+
189+
/// Unwraps this `Writer<W>`, returning the underlying writer.
190+
pub fn into_inner(self) -> W {
191+
// Safe to call `unwrap` since `write` always flushes the writer.
192+
self.writer.into_inner().unwrap()
193+
}
188194
}
189195

190196
/// A CSV writer builder

0 commit comments

Comments
 (0)