You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/04/14 20:50:32 UTC

[GitHub] [arrow-rs] alamb commented on a diff in pull request #4063: Relax JSON schema inference generics

alamb commented on code in PR #4063:
URL: https://github.com/apache/arrow-rs/pull/4063#discussion_r1167263878


##########
arrow-json/src/reader/schema.rs:
##########
@@ -265,8 +265,8 @@ pub fn infer_json_schema_from_seekable<R: Read + Seek>(
 /// // seek back to start so that the original file is usable again
 /// file.seek(SeekFrom::Start(0)).unwrap();
 /// ```
-pub fn infer_json_schema<R: Read>(
-    reader: &mut BufReader<R>,
+pub fn infer_json_schema<R: BufRead>(

Review Comment:
   The idea here is that any existing user of this API will be fine because a `&mut BufReader<R>` also implements `BufRead`?
   
   https://doc.rust-lang.org/stable/std/io/trait.BufRead.html
   
   



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org