You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/01/02 10:59:48 UTC

[GitHub] [arrow] jorgecarleitao commented on a change in pull request #9076: [Rust] Fixed performance issue in mutableBuffer.

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:
users@infra.apache.org