tustvold commented on code in PR #3728:
URL: https://github.com/apache/arrow-rs/pull/3728#discussion_r1108836911
##########
arrow-json/src/reader.rs:
##########
@@ -526,16 +528,17 @@ fn collect_field_types_from_object(
/// The reason we diverge here is because we don't have utilities to deal with
JSON data once it's
/// interpreted as Strings. We should match Spark's behavior once we added
more JSON parsing
/// kernels in the future.
-pub fn infer_json_schema_from_iterator<I>(value_iter: I) -> Result<Schema,
ArrowError>
+pub fn infer_json_schema_from_iterator<I, V>(value_iter: I) -> Result<Schema,
ArrowError>
where
- I: Iterator<Item = Result<Value, ArrowError>>,
+ I: Iterator<Item = Result<V, ArrowError>>,
+ V: AsRef<Value>,
Review Comment:
```suggestion
V: Borrow<Value>,
```
I think this should remove the need for the boxing
--
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]