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


##########
arrow-buffer/src/buffer/immutable.rs:
##########
@@ -414,7 +460,22 @@ impl<T: ArrowNativeType> From<ScalarBuffer<T>> for Buffer {
     }
 }
 
-/// Creating a `Buffer` instance by storing the boolean values into the buffer
+/// Convert from internal [`Bytes`], not [`bytes::Bytes`] to `Buffer`
+impl From<Bytes> for Buffer {
+    fn from(bytes: Bytes) -> Self {
+        Self::from_bytes(bytes)
+    }
+}
+
+/// Convert from [`bytes::Bytes`], not internal [`Bytes`] to `Buffer`
+impl From<bytes::Bytes> for Buffer {

Review Comment:
   Here is the `From` impl proposed by @tustvold  in 
https://github.com/apache/arrow-rs/pull/6930#discussion_r1903037478



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