alamb commented on a change in pull request #451:
URL: https://github.com/apache/arrow-rs/pull/451#discussion_r650389395
##########
File path: arrow/src/json/reader.rs
##########
@@ -1569,6 +1569,18 @@ impl ReaderBuilder {
}
}
+impl<R: Read> Iterator for Reader<R> {
+ type Item = Result<RecordBatch>;
+
+ fn next(&mut self) -> Option<Self::Item> {
+ match self.next() {
Review comment:
I think you might be able to do `self.next().transpose()` here
##########
File path: arrow/src/json/reader.rs
##########
@@ -1569,6 +1569,14 @@ impl ReaderBuilder {
}
}
+impl<R: Read> Iterator for Reader<R> {
+ type Item = Result<RecordBatch>;
+
+ fn next(&mut self) -> Option<Self::Item> {
+ self.next().transpose()
Review comment:
❤️
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]