You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by tu...@apache.org on 2023/02/25 21:58:32 UTC
[arrow-rs] branch master updated: feat: add into_inner for csv writer (#3759)
This is an automated email from the ASF dual-hosted git repository.
tustvold pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
The following commit(s) were added to refs/heads/master by this push:
new 96791ea47 feat: add into_inner for csv writer (#3759)
96791ea47 is described below
commit 96791ea47b032ce2ebcb07087d3b3007ea0df536
Author: Alex Huang <hu...@gmail.com>
AuthorDate: Sat Feb 25 22:58:25 2023 +0100
feat: add into_inner for csv writer (#3759)
---
arrow-csv/src/writer.rs | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arrow-csv/src/writer.rs b/arrow-csv/src/writer.rs
index d9331053f..4ec0e1bec 100644
--- a/arrow-csv/src/writer.rs
+++ b/arrow-csv/src/writer.rs
@@ -185,6 +185,12 @@ impl<W: Write> Writer<W> {
Ok(())
}
+
+ /// Unwraps this `Writer<W>`, returning the underlying writer.
+ pub fn into_inner(self) -> W {
+ // Safe to call `unwrap` since `write` always flushes the writer.
+ self.writer.into_inner().unwrap()
+ }
}
/// A CSV writer builder