jorgecarleitao commented on a change in pull request #9076:
URL: https://github.com/apache/arrow/pull/9076#discussion_r550870170



##########
File path: rust/arrow/src/buffer.rs
##########
@@ -56,6 +57,23 @@ pub struct Buffer {
 }
 
 impl Buffer {
+    /// Initializes a [Buffer] from a slice of items.
+    pub fn from_slice_ref<U: ArrowNativeType, T: AsRef<[U]>>(items: &T) -> 
Self {

Review comment:
       This was necessary because it is not possible to have this generic on 
`impl`, see 
https://users.rust-lang.org/t/how-to-implement-from-asref-u-for-generic-u/53533/5




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


Reply via email to