V0ldek commented on code in PR #6132:
URL: https://github.com/apache/arrow-rs/pull/6132#discussion_r1693990762


##########
arrow-ipc/src/reader.rs:
##########
@@ -1163,21 +1172,24 @@ impl<R: Read> fmt::Debug for StreamReader<R> {
 }
 
 impl<R: Read> StreamReader<BufReader<R>> {
-    /// Try to create a new stream reader with the reader wrapped in a 
BufReader
+    /// Try to create a new stream reader with the reader wrapped in a 
BufReader.
     ///
-    /// The first message in the stream is the schema, the reader will fail if 
it does not
-    /// encounter a schema.
-    /// To check if the reader is done, use `is_finished(self)`
-    pub fn try_new(reader: R, projection: Option<Vec<usize>>) -> Result<Self, 
ArrowError> {
-        Self::try_new_unbuffered(BufReader::new(reader), projection)
+    /// See [`StreamReader::try_new`] for an unbuffered version.
+    pub fn try_new_buffered(reader: R, projection: Option<Vec<usize>>) -> 
Result<Self, ArrowError> {
+        Self::try_new(BufReader::new(reader), projection)
     }
 }
 
 impl<R: Read> StreamReader<R> {
-    /// Try to create a new stream reader but do not wrap the reader in a 
BufReader.
+    /// Try to create a new stream reader.
+    ///
+    /// The first message in the stream is the schema, the reader will fail if 
it does not
+    /// encounter a schema.
+    /// To check if the reader is done, use 
[`is_finished(self)`](StreamReader::is_finished).
     ///
-    /// Unless you need the StreamReader to be unbuffered you likely want to 
use `StreamReader::try_new` instead.
-    pub fn try_new_unbuffered(

Review Comment:
   Definitely no harm in that :)



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to