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


##########
arrow-buffer/src/buffer/immutable.rs:
##########
@@ -356,16 +356,25 @@ impl Buffer {
     }
 }
 
-/// Creating a `Buffer` instance by copying the memory from a `AsRef<[u8]>` 
into a newly
+/// Creating a `Buffer` instance by copying the memory from a `&[u8]` into a 
newly
 /// allocated memory region.
-impl<T: AsRef<[u8]>> From<T> for Buffer {
-    fn from(p: T) -> Self {
+impl From<&[u8]> for Buffer {

Review Comment:
   Is the rationale for removing `impl<T: AsRef<..>>` so that it doesn't 
automatically call this things (like Vec) that happen to implement 
`AsRef<&[u8]>` but have a more specialized implementation? 



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